I understand the three settings associated with how many entries per bar a signal can be configured for. But I have an example, where I believe the only solution is using unlimited entries, which scares the heck out of me in the case of a unforeseen loop developing.
Here's the example I have. I enter a long and on the next bar I exit via a limit order. The only limit order for long entries I have in my script (all others are market). During this same bar I enter long again but now the only way I can exit on the same bar via limit is if I have "unlimited" checked. Because I use only one limit sell for long entries, the position won't exit using either "allow only 1 exit and entry per signal" nor "1 exit and entry per order command."
Perhaps I am wrong but I believe, the only solution here is (a) add another limit order (somehow) or (b) go unlimited (which I won't do).
Entries Per Bar
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Entries Per Bar
You could use a counter variable (that counts the number of entries per bar) conditionally prior to submitting a trade, and reset this variable to 0 when BarStatus(1) equals 0 (opening tick of the bar). See BarStatus Wikipage.Perhaps I am wrong but I believe, the only solution here is (a) add another limit order (somehow) or (b) go unlimited (which I won't do).