I’m trying to use
if(IsStopped()){ sStat=" *STOPPED*"; Print("EA Stopped"); EAComment(); return; } //- STOPPED
if live trading is stopped …
I am trying to use
if(!IsConnected()){ sStat=" *NO-TICKS*"; Print("Terminal not connected."); EAComment(); return; } //- NO TICKS
if the EA is not connected to the broker …
and on top of that(on a side note)
I am trying to stop EA if there is not enough bars
if(Bars<MA_Period){ sStat=" *NO-BARS*"; Print("Not enough bars for calculation. Bars: " + IntegerToString(Bars)); EAComment(); return; } //- NO BARS
if I go to weekly chart it says bars is 118… then how can moving average 200 period even be displayed?
This last one doesn’t seem to work appropriately …
Anyway I get an error from the EA trying to open orders
if(ticket<=0){Print("OrderSend Error: ",strError(GetLastError()));}
case 4109: return(“Trade Is Not Allowed In The Expert Properties”);
Well this doesn’t make sense either, because it’s the weekend, terminal is connected …
And I have been reading the CheckUp and getting no where is basically why I seek help