Login Page - Create Account

Support Board


Date/Time: Fri, 19 Apr 2024 18:19:09 +0000



[Programming Help] - Control number of trades per bar

View Count: 820

[2020-01-17 11:17:30]
User564539 - Posts: 27
How do i limit the number of trades per buy to configurable value e.g. 2, or 4 etc.
[2020-01-17 12:42:14]
Ackin - Posts: 1863
Intraday Chart Bar Period >> Bar Period Type >> Number of Trades Per Bar (Chart >> Chart Settings menu)
Chart Settings: Intraday Chart Bar Period >> Bar Period Type >> Number of Trades Per Bar (Chart >> Chart Settings menu)
[2020-01-17 13:06:10]
User564539 - Posts: 27
Thanks Ackin, but i mean my own trades initiated when using a spreadsheet. I can use signal only once but sometimes it doesn't work well with the buy and sell signals, so maybe something that counts number of times a buy (1) is generated in column K
[2020-01-17 13:10:51]
Ackin - Posts: 1863
Sorry, I'm not working with Spreadsheets. This is a question for someone else (tomgilb ...)
Date Time Of Last Edit: 2020-01-17 13:11:01
[2020-01-17 15:20:37]
Sawtooth - Posts: 3973
The 'Signal Only Once Per Bar' setting is column specific, so if it was set to Yes it will allow one K3 buy entry and one M3 sell entry per bar.
This would be an issue if 'Signal Only On Bar Close' is set to No, and you are using Reversals.

Spreadsheet Systems, Alerts and Automated Trading: Signal Only Once per Bar

If you only want an entry at the first TRUE occurrence intrabar from either K3 or M3, try this in K3 and M3:
=AND(YourConditions,$J$8=0)

BTW, there is no way to count the number of times a condition goes TRUE intrabar.

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

Login

Login Page - Create Account