MQL4 - automated forex trading   /  

Forum

How to make real time chart EA to run like a control point model?

Back to topics list To post a new topic, please log in or register

avatar
2
noooob123 2007.06.15 11:18 
How to make real time chart EA to run like a control point model? I mean in a real time chart, EA will run at each tick. how to program it to make a real time chart run like a control point model? skip the rest of tick & only run at the control point.
article

Analytical Report by Better

The leader of the Championship, Olexandr Topchylo (Better), can both develop profitable Expert Advisors and analyze them. He made very interesting conclusions in the course of his research.


avatar
Moderator
33780
Rosh 2007.06.15 12:13 
Сontrol point model is only virtual model for running back testing of EA. These control points are diffrence from real points in past and calculated if you don't have deep detailed history.

avatar
2
noooob123 2007.06.15 12:20 
Rosh wrote:
Сontrol point model is only virtual model for running back testing of EA. These control points are diffrence from real points in past and calculated if you don't have deep detailed history.


1) I still do not how control points work. how it separate into 12 point? If using hourly chart, is it run each 5 minute(60 minute/12 points)?

2) For every tick model. is it exactly same with real time data if using a full detail history data?


avatar
Moderator
33780
Rosh 2007.06.15 13:39 

avatar
1515
DxdCn 2007.06.16 11:32 

It is impossible since test useing simulated data generated by softwre based on real history data.

But in real time, only have price at some time and no price data or no data-change at some time, you can not use simulated data at real time in real world since only there are real price data at real time.

1) I still do not how control points work. how it separate into 12 point? If using hourly chart, is it run each 5 minute(60 minute/12 points)?

yes, 12 point data generated by softwre based on real history data of hours, but 12 point not same as real 5 min that time.

2) For every tick model. is it exactly same with real time data if using a full detail history data?

no, data generated through another mode by softwre based on real history data.


avatar
2077
vixenme 2007.06.19 04:42 
interesting !!

what do those control point are calculated from?
what kind of deep history?

avatar
6
russb 2007.06.19 05:28 
would the following code block work for counting control points:
   static datetime last_tick = NULL;
   
   bool new_control = false;
   if (last_tick != NULL)
   {
      for (int m = 5; m <= 60; m += 5)
      {
         if (m < 60)
         {
            if (TimeMinute(last_tick) == m-1 && TimeMinute(TimeCurrent()) == m) 
            {
               new_control = true;
               break;
            }
         }
         else
         {
            if (TimeMinute(last_tick) == 59 && TimeMinute(TimeCurrent()) == 0) 
            {
               new_control = true;
               break;
            }         
         }
      }
      
   }
   
 
   if (new_control)
   {
        . . .
   }
   
   
   last_tick = TimeCurrent();

I started a new thread for the EA I'm working on that has this very same problem. Please review

Backtesting Control Points - What's the calculation ? What's the solution ?
'Backtesting Control Points - What's the calculation ? What's the solution ?'




avatar
6
russb 2007.06.19 05:36 
You basically gave me the idea of subdividing the bar to only perform when a new interval from within that bar has been completed. This of it like this:

On a 1HR Chart, 60min/5min = 12 control points. or 60min/10min = 6 control points. In the article

Strategy Tester: Modes of Modeling during Testing

posted somewhere here on this forum they state that if theres no data on the smaller time frame they use 12 control points, hence 60min/5min = 12 control points. They also state that once data on the smaller time frame becomes available they use 6 control points, hence 60min/10min = 6 control points.

The code block I posted previously may not be the precise solution but it may be a step in the right direction. Basically, the variable "new_control" only becomes active if the tick passes to a new control interval.

ps. I'm expecting responses to this.

avatar
125
Zap 2007.06.19 12:14 
I replied here: http://forum.mql4.com/7046
One thread would be enough for this. The same issue is unclear in all these topics.
Back to topics list  

To add comments, please log in or register