| / | Forum |
|
NOOB250
2012.01.28 01:24
The system will sell when the current price reach the upper bolinger bands,but it seems don't work .Help me,thank a million!!!!!!! |
|
This article contains the description of writing a simple and convenient indicator displaying in a working area the main economic events from external Internet resources. |
|
serpentsnoir
2012.01.28 02:03
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; |
|
danjp
2012.01.28 02:29
NOOB250: The system will sell when the current price reach the upper bolinger bands,but it seems don't work .Help me,thank a million!!!!!!!
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); |
|
NOOB250
2012.01.28 13:56
serpentsnoir: 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! |
|
NOOB250
2012.01.28 13:57
danjp:
2) Put Print() statments in your code so you can debug it and see what is going wrong. like this thank you guys |