EA in strategy tester work, on LIVE not ...need help - page 2

 

Hi all

Did you find where is problem in EA code?

thanks to all

 
gass:

Hi all

Did you find where is problem in EA code?

thanks to all

Hi gass

Error is here:

 

extern string samplingEndTime   = "14::00";

 

One too many colons. Should be:

extern string samplingEndTime   = "14:00";

 

Once you change that it will start opening orders live. Also, just to make sure it's doing what you want, I suggest you add this debug line in the start() function.

Comment("Trading: ",trading,"\n Sampling: ",sampling,"\n Hi: ",DoubleToStr(hi,5),"\n Low: ",DoubleToStr(lo,5) );

 

Hope that helps

Cheers
Filter

 
gass:

yes I have al smiles ...auto tradeing button is ON ...also in EA propertis Allow live trading is ON

In strategy tester journal is writen:  TestGenerator:unmatched data error (volume limit 1113 at 2015.01.05 00:00 exceeded) - - - I put test period from 5.1.14 till today and after that errors in journal EA start trading in strategy tester

In LIVE journal is writen: Expert loaded successfully .....automated trading enabled ...but no trading activity

Thank you

gass, it seems the data in your meta trader not matched between timeframes. i've experienced with this kind of problem. for advise, sometimes downloading data (F2) from your MT4 generate errors like these.

And to identify your ea run or not, you may add some Print function to show your code statement do the job or not.

 

thank you all

buy/sell now work on live

now is problem with history :)  .....example if I start computer and  ea at 10h and set variables start time 8:00 till end time 9:00 ...then ea do not know to find high / low levels from that period. Ea only find time periods in future ...example computer and ea start at 10h thet if I set start time 11h tll end time 12h   then will find high /low levels in that period

how to fix that

thank to all


 

 
gass:

thank you all

buy/sell now work on live

now is problem with history :)  .....example if I start computer and  ea at 10h and set variables start time 8:00 till end time 9:00 ...then ea do not know to find high / low levels from that period. Ea only find time periods in future ...example computer and ea start at 10h thet if I set start time 11h tll end time 12h   then will find high /low levels in that period

how to fix that

thank to all


 

You actually don't need to use the sample period at all. Just before the ea begins trading, check iHigh/iLow for that period.
Reason: