I had a short and a long script for trades each direction but now I want to have both in one script as entry conditons can be exit conditons of other trade as well. But I dont know what I´m doing wrong because eg when closing last position short I have then 4 longs (instead of 3). In the code I have ..
if(conditions for long ...)
{ExitShort();
entryOrderL1=EnterLong(1,"L1");
entryOrderL2=EnterLong(1,"L2");
entryOrderL3=EnterLong(1,"L3");
Why are there 4 longs now as you can see in the attached screenshot?
And then with a new short entry with all longs running I have 6 shorts instead of 3 (please see screenshot "ExitEntry_2")
// I have "normal" SetStopLoss and SetProfitTarget in the code (but using iOrders for things like counting...)
Thank you!
Tony
Comment