Hi, I’m looking for some syntax suggestions on how to place an order like this:
IF executed trades between times 080000 - 120000 have been profitable (i.e. >0 profit), then stop executing further trades for the day.
ELSE, continue executing trades as normal as defined by the strategy
I have a rough idea on how to code it, but I do not know what specific ProRealTime functions to use here to keep track of the number of profitable trades executed.
Would appreciate any help, thanks
You could try to store the barindex of 080000 and do the same for 120000. Then you can do a loop through the last tradeindex and find trades that occurred between these 2 start and stop barindex you previously stored in variables.