Hello!
All search results I’ve found only deal with how to limit your trades per day when using market orders. Currently, I’m using something like this:
once EntriesToday = 0
// Reset for each day
if Date[1] <> Date[0] then
EntriesToday = 0
endif
If OnMarket[0] <> 0 and OnMarket[1] = 0 then
EntriesToday = EntriesToday + 1
endif
If not OnMarket and EntriesToday < 1 then
Buy 1 contract at myLevel Stop // Stop order
endif
Here’s the problem. My systems always use stop orders to enter the market and sometimes a system is stopped out on the same bar it entered the trade, but EntriesToday can never be incremented with my current code. Thus it will attempt a second trade that I don’t want next bar again.
I haven’t come up with a solution for this. Do any of you guys have suggestions to solve this? Or if there’s a setting for max executed orders per day in PRT I somehow missed
Thanks
To check if a trade has been both triggered and exited on the same bar you need to check STRATEGYPROFIT:
If StrategyProfit <> StrategyProfit[1] then
EntriesToday = EntriesToday + 1
endif
That worked, thanks a lot!