Forum

Upload EA with OOP style code to MQL5 market

Hello everybody, I tried to upload new version of my EA to MQL5 market but this time code was written in object oriented style. I can't pass validation tests and there is a message that some checks I didn't pass. Specifically that checks are considering lot size. I have mechanisms that prevent that

Trailing pending orders

#include <Trade\Trade.mqh> CTrade trade; input int TrailingPoints = 1000 ; input int TslTriggerPoints = 2000 ; int OnInit () { return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason) { } void OnTick () { double Ask= NormalizeDouble ( SymbolInfoDouble ( _Symbol , SYMBOL_ASK