Login Page - Create Account

Support Board


Date/Time: Tue, 07 May 2024 10:21:57 +0000



[Programming Help] - limit the amount of symbols with open position

View Count: 426

[2020-12-28 05:22:09]
User978290 - Posts: 25
Seems like I will have to ask some experts on this forum regarding limiting the amount of symbols with open position during replay.

The current setup is as Follows.

US Stocks only
200 Charts
Spreadsheet Study for Trading on all charts
1 Chartbook
1 Spreadsheet with all 200 sheets
all sheet's formula points to sheet1

I run the replay accurate backtest, charts with same link number, 60sec and everything works, the entries / exit is as it should.

How will I be able to limit the amount of symbols with open position during replay?
I want to be able to limit to 20 symbols that can have open position. (Order Quantity is provided by formula)

I tired using Column H on sheet1 with =IF(Sheet1!J$8 > 0, 1, 0), =IF(Sheet2!J$8... =IF(Sheet3!J$8... up to all sheets.
than on Formula Column AF3 on sheet1 with =sum(Sheet1!H$3:Sheet1!H$200) <= 20
than use AF = 1 on Column K3 (Buy Entry)

However, the spreadsheet seems to ignore AF = 1 if more than 20 Buy Entry happens at the same time.
The trade Log would show 25 entries. I was assuming only 20 would get thru.

Please send me some pointers on how to solve this. Thanks

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

Login

Login Page - Create Account