Hello all,
I'd like to have a buystop and a sellstop taken at the same time. The buystop is always triggered, but the sellstop is only triggered for one second and disappeared leaving only the buystop. How do I correct that? Do I need to post some other parts of the code in order for you to help?
Thanks in advance for helping me.
Regards,
ypierre
Code:
if(position && lastsig!=1) {
co=CalculateCurrentOrders(Symbol());
if (co==0) {
res = OpenStop(OP_BUYSTOP,LotsRisk(StopLoss), High[shift]+OrderPipsDiff*Point, StopLoss, TakeProfit1);
res = OpenStop(OP_SELLSTOP,LotsRisk(StopLoss),Low[shift]-OrderPipsDiff*Point, StopLoss, TakeProfit2);
}
last=Time[0];
lastsig=1;
return;
I'd like to have a buystop and a sellstop taken at the same time. The buystop is always triggered, but the sellstop is only triggered for one second and disappeared leaving only the buystop. How do I correct that? Do I need to post some other parts of the code in order for you to help?
Thanks in advance for helping me.
Regards,
ypierre
Code:
if(position && lastsig!=1) {
co=CalculateCurrentOrders(Symbol());
if (co==0) {
res = OpenStop(OP_BUYSTOP,LotsRisk(StopLoss), High[shift]+OrderPipsDiff*Point, StopLoss, TakeProfit1);
res = OpenStop(OP_SELLSTOP,LotsRisk(StopLoss),Low[shift]-OrderPipsDiff*Point, StopLoss, TakeProfit2);
}
last=Time[0];
lastsig=1;
return;