[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 296

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Throw in the current graph
I would be inclined to think that the error lies in the code itself. Surgical intervention in the script itself is necessary.
Here's the script itself...
Here's the script itself...
I would be inclined to think that the error lies in the code itself. Surgical intervention in the script itself is necessary.
Maybe changing the gasket would help
how do I modify Buy and Sell orders separately?
if (OrderType()==OP_BUY && Open[0]>Low[steploss] && OrderStopLoss()<trailstopbuy){
OrderModify(OrderTicket(),OrderOpenPrice(),trailstopbuy,OrderTakeProfit(),0,Blue);
return(0);
}
if (OrderType()==OP_SELL && Open[0]<High[steploss] && OrderStopLoss()>trailstopsell){
OrderModify(OrderTicket(),OrderOpenPrice(),trailstopsell,OrderTakeProfit(),0,Blue);
return(0);
}
so what?
how to modify Buy and Sell orders separately?
if (OrdersTotal()>0){
for(int g=OrdersTotal()-1; g>=0; g--){
OrderSelect(g,SELECT_BY_POS);
if (OrderMagicNumber()==2563 && OrderType()==OP_BUY){
if (Open[0]<=Low[steploss]){
OrderClose(g,1,Bid,3,Red);
return(0);
}
if (GradusEDBuy==true){
OrderClose(g,1,Bid,3,Red);
return(0);
}
}
}
if (OrderMagicNumber()==2563 && OrderType()==OP_SELL){
if (Open[0]>=High[steploss]){
OrderClose(g,1,Ask,3,Red);
return(0);
}
if (GradusEDSell==true){
OrderClose(g,1,Bid,3,Red);
return(0);
}
}
}