Doubt period converter indicator

 

Hi all,

i am searching an indicator of period converter because i need call M2 timeframe but i want only one chart open (M1 for atach period converter indicator) but not chart offline m2, and other chart where one indicator call data of m2 chart. I prove period_converter Opt indicator but no run. Does run for yours? Do you know other period converter indicator?

 

Thank you very much!! 

 

You want an M2 chart but you don't want to open it? How do you expect to run an Indicator on an M2 Chart but not have it opened?

As for "PeriodConverter.mq4", it is a Script that only runs on request. It is not an Indicator that runs continually to produce an continually updated an "Offline HST Chart".

There are 3rd party tools available to produce M2 Offline Charts but you will have to do a Google search as we are not allowed to advertise here.

 
FMIC:

You want an M2 chart but you don't want to open it? How do you expect to run an Indicator on an M2 Chart but not have it opened?

As for "PeriodConverter.mq4", it is a Script that only runs on request. It is not an Indicator that runs continually to produce an continually updated an "Offline HST Chart".

There are 3rd party tools available to produce M2 Offline Charts but you will have to do a Google search as we are not allowed to advertise here.

Hi,

thank you very much for your reply. I saw the indicator. But i have one doubt:

for example i am in M1 chart. This M1 chart has two indicators:

 1- The indicator that built M2 timeframe

 2- Other indicator that display values of M2 time frame in chart M1.

The indicator "2" not run. I want values of M2 timeframes in M1, for example:

t=iClose(NULL,PERIOD_M2,1);

Comment("Close M2 = " +DoubleToStr(t,5));

 and display this value in M1 chart, but still not possible.

Any suggest will be very appreciated. I have several doubts with non standard time frames.

Thank you very much 

 

The "iClose()" function can only access built-in time frames. You can also access data from the chart itself via the "Close[]" array (or "close[]" array in the "OnCalculate()" event handler). In fact all the standard functions can only access built-in time-frames or its own current chart data.

So in essence, only the EA or Indicator running on the M2 Offline Chart has access to that data. No other chart can access that data directly.

However, you can mimic the equivalent of a non-standard time-frame in your own code, by building the data in real-time based on the M1 data. Here is a link to an article about that:

 
FMIC:

The "iClose()" function can only access built-in time frames. You can also access data from the chart itself via the "Close[]" array (or "close[]" array in the "OnCalculate()" event handler). In fact all the standard functions can only access built-in time-frames or its own current chart data.

So in essence, only the EA or Indicator running on the M2 Offline Chart has access to that data. No other chart can access that data directly.

However, you can mimic the equivalent of a non-standard time-frame in your own code, by building the data in real-time based on the M1 data. Here is a link to an article about that:

Thank you very much!!

I am going to study this last option! 

 

Hi again!!

i read the article several times and for design the code i need to understand well the steps, because i want some different thing.

Fo example, (it is an example, but the logic is similar):

i want to show value of MA of M2 time frame in M1 time frame. So, i should have:

 

1- create hist of M2 timeframe with M1 timeframe

2- calculate MA with hist data of M2 timeframe

3- show value in M1 timeframe.

 

Is this correct?

Any suggest would be very appreciate because operations with non standard timeframes is very new for me.

Thank you very much in advance!! 

 
Messi86:

Hi again!!

i read the article several times and for design the code i need to understand well the steps, because i want some different thing.

Fo example, (it is an example, but the logic is similar):

i want to show value of MA of M2 time frame in M1 time frame. So, i should have:

 

1- create hist of M2 timeframe with M1 timeframe

2- calculate MA with hist data of M2 timeframe

3- show value in M1 timeframe.

 

Is this correct?

Any suggest would be very appreciate because operations with non standard timeframes is very new for me.

Thank you very much in advance!! 

Any other article about this subject? !

Thank you very much! 

 
Messi86:

Any other article about this subject? !

Thank you very much! 

Is this correct the previous logic?

 

Thank you very much 

 

I cannot say if the logic is correct or not, because I don't know what you want to achieve in detail nor have you provided any code to be used as a reference.

I have already pointed out that when using an Offline Chart, all other charts will not have access to its data and that if you want M2 data from within the M1 Chart, you have to mimic that data and generate it locally and not from an Offline History Chart.

 
FMIC:

I cannot say if the logic is correct or not, because I don't know what you want to achieve in detail nor have you provided any code to be used as a reference.

I have already pointed out that when using an Offline Chart, all other charts will not have access to its data and that if you want M2 data from within the M1 Chart, you have to mimic that data and generate it locally and not from an Offline History Chart.

Thank you very much for your reply!

Your second option is what i want it. I read and study your link, but they work with generating offline chart. My propose is "Values of non standard timeframe in standard timeframe without open offline chart". So for example, i want to show in m1 chart, values of moving average of m2 timeframe.

I search for internet and did not find nothing about this case.

Now, i want the correct logic for correct code.

So, what steps must i follow ?

Thank you very much!! 

 
Messi86:

Your second option is what i want it. I read and study your link, but they work with generating offline chart. My propose is "Values of non standard timeframe in standard timeframe without open offline chart". So for example, i want to show in m1 chart, values of moving average of m2 timeframe.

Well, then use the same logic as for generating Offline HST files, but apply it to an internal array of of the data which is even easier than output to a file.

Just generate the same data, but instead of outputting it into a file, just save it in an MqlRates array or multiple arrays for the individual OHLC values so that it is easier to use functions like "iMAOnArray()".