Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 03:31:22 +0000



[Programming Help] - Can I create automated trading based on imbalances from footprint?

View Count: 1398

[2022-04-21 12:56:38]
ianheijden - Posts: 3
Hi, I'd like to create a automated trading system which would act on stacked imbalances pulled from footprint. I've tried to create this through the 'spreadsheet system for trading' study, but to no avail. The necesarry setting (column 1 percent compare thresholds (IN:91)) which shows imbalances isn't located in the spreadsheet. I also can't find the correct code to buy based on multiple imbalances within a certain range from current traded price.

My questions are as followed:

- Can my idea (automated buy or sell based on (3 or more) stacked imbalances formed within a certain range from currently traded price(5 ticks up/down)) be creating within the study 'spreadsheet system for trading'. And if so how could I do this?
- If it can't be created within the study 'spreadsheet system for trading' can it be created in SC's Advanced Custom Study Interface and Language (ACSIL)? If possible then how should I go about this and if possible which one of the examples can I use as a basis? I have no prior experience with coding as such any help is appreciated.

(if any users know of bots/studies similar to my idea which are public I'd love a link to it for reference)

thank you in advance and have a blessed day
[2022-04-21 13:50:53]
Sawtooth - Posts: 4120
Can my idea...be creating within the study 'spreadsheet system for trading'
AVAP and BVAP values are not directly available in a spreadsheet study.
However, they are available to Simple Alerts, which can then be seen by a spreadsheet study.
You would use multiple instances of the Spreadsheet Formula study, using its Formula field, one instance for each price from the current price.
Study/Chart Alerts And Scanning: BVAP

can it be created in SC's Advanced Custom Study Interface and Language (ACSIL)?
Not an expert there, but probably.
[2022-04-21 16:03:18]
ianheijden - Posts: 3
Hi tom, maybe I'm missing something but the simple alerts aren't working for me. The AVAP and BVAP are simply the current ask and bid prices. making alerts from the BVAP and AVAP only seem to indicate when sellers/buyers hit the ask/bid. I can't get it to detect imbalances which would (with my settings) be 300% more bid compared to the ask or vice versa.
[2022-04-21 16:24:41]
Sawtooth - Posts: 4120
You would need an instance of the Spreadsheet Formula study for the BidVol and AskVol of each price, then compare them.
So you'd need 2 instances for every price.

If you want to see +/- 5 ticks on both sides of the current price, you'd need 20 instances.
And you'd use 10 Formula Columns on the spreadsheet, each with the comparison result for the 10 prices.
Then you'd use another Formula Column to find the stacked imbalances across each row.

This is a cumbersome workaround, but doable. The only other solution is to code something in ACSIL.
[2022-04-21 16:52:07]
ForgivingComputers.com - Posts: 960
can it be created in SC's Advanced Custom Study Interface and Language (ACSIL)?

Yes. DM me if interested in a quote.
[2022-04-21 18:40:36]
ianheijden - Posts: 3
Hi tom, from what you describe it certainly sounds possible to create the workaround. I'm however not the most technically blessed mind and have some trouble creating the desired results. I also have trouble locating the alerts in the spreadsheet itself. This is my current chartbook attached, could you take a look at wether I'm doing this correctly and if it's not too much to ask possibly create the alerts/ spreadsheet formula for 1 tick so I can understand the process and finish the project afterwards.
attachmentProject.cht - Attached On 2022-04-21 18:40:29 UTC - Size: 12.19 KB - 364 views
[2022-04-21 20:05:51]
Sawtooth - Posts: 4120
My suggestion is not to create alerts within Numbers Bars studies.
It is to return the BVAP and AVAP at a certain price level, so that they can be compared to each other.
IOW, you don't need multiple Numbers Bars studies, you need multiple Spreadsheet Formula studies.

Use a pair of formulas like this in a pair of Spreadsheet Formula study's Formula fields:
=BVAP(C+TICKSIZE*1,0)
=AVAP(C+TICKSIZE*1,0)

These values will appear in the spreadsheet study's spreadsheet in columns AA and above.
Reference them from a Formula Column to compare if one is 3 times the other.
Replicate this for each price level, then find the stacked imbalances across all prices.

This is the basic concept.
[2023-10-01 11:21:03]
User347921 - Posts: 39
@ianheijden @Sawtooth Did you find a solution based off spreadsheet? I think I'm very close. See the chart below. The Signal is shown with the Green/Orange Arrows. I have added Cum Delta to filter or as a confirmation. I also used the "Buy on First Signal and Ignore Multiple Signals" Spreadsheet Example Formulas and Usage: Buy on First Signal and Ignore Multiple Signals to avoid multiple Signals in the same direction. Graph NQ 4500 Ticks, based on French time.
https://www.sierrachart.com/image.php?Image=1696159159329.png
Date Time Of Last Edit: 2023-10-04 09:51:39
imageStacked Imbalance System.png / V - Attached On 2023-10-01 11:09:37 UTC - Size: 202.39 KB - 180 views

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account