template method – behavioral design pattern – library MetaTrader 5

template method - behavioral design pattern - library for MetaTrader 5
//+——————————————————————+ //|                                               TemplateMethod.mq5 | //|                                    2019-2020, dimitri pecheritsa | //|                                                 792112@gmail.com | //+——————————————————————+ // //   template method – behavioral design pattern // //   from: design patterns: elements of reusable object-oriented software //   by gof: erich gamma, richard helm, ralph johnson, john vlissides //   published in 1994 // //   intent //   //   define the skeleton of an … Read more

MT4 EA Template with all the basic features – EA MetaTrader 4

MT4 EA Template with all the basic features - expert for MetaTrader 4
The buy and sell conditions go as ‘bool’ value parameters in the Direction function, as you can see in the default example.    int signalConditions=3;    DashKeys[openCloseConditionIdx+1-1]=”BB Status”;    DashValues[openCloseConditionIdx+1-1]=Direction(ok(bbGreen) && bbGreen!=-1,ok(bbRed) && bbRed!=-1,canBuy,canSell, ” at “+TimeToStr(Time[masterCandleIdx]), ” at “+Time[masterCandleIdx]); The canBuy and canSell variables will get out set as true or false based on … Read more