Coding query
What code do I require if = I want my current trade to close before another trade is opened? What I am finding in my back testing ‘order list’ is that I get multiple triggers. I only want to trigger a new trade entry once the prior trade has been closed by either my stop or take profit target.
Thank you
Chris Wilson
When you test conditions to enter a trade you should add the keyword ONMARKET to test whether you already have, or don’t have, any open trade
IF MyConditions AND Not OnMarket THEN
BUY/SELLSHORT....
ENDIF
also, you may add at the very beginning of your code (where DEFPARAMs need to be located)
DEFPARAM CumulateOrders = false
you can use both.
Thank you – I just saved this in my template