-
if ( Time [0] > CurrentBarTime ) { // new bar created CurrentBarTime = Time[0] ;
There was a case a few years back there a broker had the time correct but the date wrong. Once corrected the EA stops trading. Use ≠ instead. -
bool isBull = false ; if ( Open [1] < Close[1] ) isBull = true ;
Simplify: bool isBull = Open[1] < Close[1];
-
if(RoomToTheLeft == true )
You should be able to read your code out loud and have it make sense. You would never write if( (2+2 == 4) == true) would you? if(2+2 == 4) is sufficient. So don't write if(bool == true), just use if(bool) or if(!bool). Code becomes self documenting when you use meaningful variable names, like bool isLongEnabled where as Long_Entry sounds like a trigger price or a ticket number and "if long entry" is an incomplete sentence. -
bool IsRoomToTheLeft = IsThereRoomToTheLeft(isBull); Alert("the Previous candle is the biggest ,engulfing and has room to the left "); if ( IsRoomToTheLeft == false ) { return ; }
Don't lie to yourself.
- Perhaps you should read the manual.
Your code Documentation int ticket = OrderSend( Symbol(), OP_BUYSTOP , LotPerTrade , Slippage , StopLoss , TakeProfit , "this is an bullish buy trade" , ExpirationTime , clrGreen );
int OrderSend( string symbol, // symbol int cmd, // operation double volume, // volume double price, // price int slippage, // slippage double stoploss, // stop loss double takeprofit, // take profit string comment=NULL, // comment int magic=0, // magic number datetime expiration=0, // pending order expiration color arrow_color=clrNONE // color );

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