This might work. It compiles, looks ok, I didn't run it.
Small change to your print statements location.
The code does not prohibit multiple signals, so there may be more than one true at the same time.
voidCheckForOpen(){intres,tr;
//---- sell conditionsco=CalculateCurrentOrders(Symbol());
if(sellsig && lastsig!=-1){co=CalculateCurrentOrders(Symbol());
if(co==0){if(Short == true)Print(" Short signal taken ");
if(Short2 == true)Print(" Short2 signal taken ");
if(Short3 == true)Print(" Short3 signal taken ");
if(Short4 == true)Print(" Short4 signal taken ");
res = OpenStop(OP_SELLSTOP,LotsRisk(StopLoss), Low[shift]-OrderPipsDiff*Point, StopLoss, TakeProfit1);
}lastsig=-1;
last=Time[0];
return;
}//---- buy conditionsco=CalculateCurrentOrders(Symbol());
if(buysig && lastsig!=1){co=CalculateCurrentOrders(Symbol());
if(co==0){if(Long == true)Print(" Long signal taken ");
if(Long2 == true)Print(" Long2 signal taken ");
if(Long3 == true)Print(" Long3 signal taken ");
if(Long4 == true)Print(" Long4 signal taken ");
res = OpenStop(OP_BUYSTOP,LotsRisk(StopLoss), High[shift]+OrderPipsDiff*Point, StopLoss, TakeProfit1);
}last=Time[0];
lastsig=1;
return;
}}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Place Print("this Position is ....
after your ordersend(....)
This might work. It compiles, looks ok, I didn't run it.
Small change to your print statements location.
The code does not prohibit multiple signals, so there may be more than one true at the same time.
I have tried both ways but still end up with a list
Then "think about something else" as my Dad used to say.
Go fishing.
Eat a peach.
Cheers
Did you run the attched file? It has my changes...
Did you run the attched file? It has my changes...
Cheers
Have a great Christmas.
Here you go, try again...
I think you have done it I will have a look,
I have been missing out the "_" in the ordersend line.
Cheers