the program is trying to open a sell if the High of the current bar is above the upper band
change this line:
double myopen=iHigh(Symbol(),0,0);
to
double myopen=Bid;
The system will sell when the current price reach the upper bolinger bands,but it seems don't work .Help me,thank a million!!!!!!!
1) Check the retcode from the OrderSend
2) Put Print() statments in your code so you can debug it and see what is going wrong. like this
//<---- Put this above the "if" Print("bandshigh = " + DoubleToStr(bandshigh, Digits)); Print("bandslow = " + DoubleToStr(bandshigh, Digits)); Print("myopen = " + DoubleToStr(bandshigh, Digits)); //<---- Put this above the OrderSend Print("About to make a trade"); //<--- Check your error on order send like this ticket=OrderSend(Symbol(),OP_SELL,0.1,Bid,500,Bid+1000*Point,Bid-200*Point,"sell",1,0,White); if(!(ticket>=0)) int err = GetLastError(); Print("OrderSend() failed error #: " + err);
the program is trying to open a sell if the High of the current bar is above the upper band
change this line:
double myopen=iHigh(Symbol(),0,0);
to
double myopen=Bid;
thank you it 's really helpful!
1) Check the retcode from the OrderSend
2) Put Print() statments in your code so you can debug it and see what is going wrong. like this
thank you guys
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The system will sell when the current price reach the upper bolinger bands,but it seems don't work .Help me,thank a million!!!!!!!