Expert only on single time frame

 

sir/ ma'am ,

I am trying to add an expert in market that give immense results but work that work on single time frame only . 


can you help me with publishing this ?


my expert give great results but work only on daily time period . I don't want this to be checked on different time frames as it gives bad results and errors. 

please help in this regard

 
Abhishek Gupta:

sir/ ma'am ,

I am trying to add an expert in market that give immense results but work that work on single time frame only . 


can you help me with publishing this ?


my expert give great results but work only on daily time period . I don't want this to be checked on different time frames as it gives bad results and errors. 

please help in this regard

put that in the init funciton:


if (Period() != PERIOD_D1)

        return INIT_FAILED;

 
Jean Francois Le Bas:

put that in the init funciton:

if (Period() != PERIOD_D1)

        return INIT_FAILED;

Don't do that. It will be unlikely to pass validation.

You could try hardcoding it so that it works with D1 no matter what the chart time-frame is.

 
Keith Watford:

Don't do that. It will be unlikely to pass validation.

You could try hardcoding it so that it works with D1 no matter what the chart time-frame is.

yeah there are many ways to do it. But i guess your way is better :)

 
Jean Francois Le Bas:

yeah there are many ways to do it. But i guess your way is better :)

id go with

if(ChartPeriod() != PERIOD_D1) ChartSetSymbolPeriod(0,NULL,PERIOD_D1);

and run this check regularly (not just in init) to stop the user breaking the ea through sheer stupidity.

 
el_looto:

id go with

if(ChartPeriod() != PERIOD_D1) ChartSetSymbolPeriod(0,NULL,PERIOD_D1);

and run this check regularly (not just in init) to stop the user breaking the ea through sheer stupidity.

ChartSetSymbolPeriod() will not work in the tester.

 
Keith Watford:

ChartSetSymbolPeriod() will not work in the tester.

You can set that manually. Why would anyone test an EA optimized for D1 on M5, especially if he is the author? 😂

 
Keith Watford:

ChartSetSymbolPeriod() will not work in the tester.

Nelson Wanyama:

You can set that manually. Why would anyone test an EA optimized for D1 on M5, especially if he is the author? 😂

Of course it can be set manually, but this topic is about getting an EA validated for the market. Validation is done in a testing environment and I pointed out that the function will not work in the tester. That was in reply to el_looto's suggestion.

The validation is done automatically, so it is not the author that is doing the testing.

Reason: