reading offline chart indicator in another different offline chart... - page 2

 
tradability:

I have tested it and It does not work unless I did something wrong but i recall trying this before doing exactly as you recommended and it not working.

Did you test it yourself or your going by wha you feel would work?

 

So you know i tried from offline to offline and offline to time based and non worked. 

I've never tried this . . .  I don't use Technical Indicators other than when trying to help people that need help with them . . . it is just what I think should work, I have some offline charts I can try,  I'll let you know what I find.
 
RaptorUK:
I've never tried this . . .  I don't use Technical Indicators other than when trying to help people that need help with them . . . it is just what I think should work, I have some offline charts I can try,  I'll let you know what I find.

Just tried it from a live GBPJPY H1 chart looking at an offline chart . . .  works just fine.

Experts tab:

2012.12.05 15:16:25 VariousFunctionTest GBPJPY,H1: Next bar number: 40 date: 2012.06.13 15:15 iMA( CBEURUSD, 15, 1, 0, MODE_SMA,PRICE_OPEN, BarIndex) = 1.25833

2012.12.05 15:16:24 VariousFunctionTest GBPJPY,H1: Next bar number: 39 date: 2012.06.13 15:30 iMA( CBEURUSD, 15, 1, 0, MODE_SMA,PRICE_OPEN, BarIndex) = 1.25736

2012.12.05 15:16:24 VariousFunctionTest GBPJPY,H1: Next bar number: 38 date: 2012.06.13 15:45 iMA( CBEURUSD, 15, 1, 0, MODE_SMA,PRICE_OPEN, BarIndex) = 1.25740

2012.12.05 15:16:24 VariousFunctionTest GBPJPY,H1: Next bar number: 37 date: 2012.06.13 16:30 iMA( CBEURUSD, 15, 1, 0, MODE_SMA,PRICE_OPEN, BarIndex) = 1.25732

2012.12.05 15:16:24 VariousFunctionTest GBPJPY,H1: Starting date: 2012.06.13 16:30 Bar index= 37

 

Code snippet:

datetime StartDate = D'13.06.2012 16:30';

int start()
   {

   static int BarIndex;

   
   if(BarIndex == 0)
      {
      BarIndex = iBarShift("CBEURUSD", PERIOD_M15, StartDate);
      Print("Starting date: ", TimeToStr(StartDate, TIME_DATE|TIME_MINUTES), " Bar index= ", BarIndex );
       
      }
      
   Print("Next bar number: ", BarIndex, " date: ", TimeToStr(iTime("CBEURUSD", PERIOD_M15, BarIndex), TIME_DATE|TIME_MINUTES), " iMA( CBEURUSD, 15, 1, 0, MODE_SMA,PRICE_OPEN,     
      BarIndex) = ", DoubleToStr(iMA("CBEURUSD", 15, 1, 0, MODE_SMA,PRICE_OPEN, BarIndex), 5) ); 
   BarIndex++;
 
RaptorUK:

Just tried it from a live GBPJPY H1 chart looking at an offline chart . . .  works just fine.

Experts tab:

2012.12.05 15:16:25 VariousFunctionTest GBPJPY,H1: Next bar number: 40 date: 2012.06.13 15:15 iMA( CBEURUSD, 15, 1, 0, MODE_SMA,PRICE_OPEN, BarIndex) = 1.25833

2012.12.05 15:16:24 VariousFunctionTest GBPJPY,H1: Next bar number: 39 date: 2012.06.13 15:30 iMA( CBEURUSD, 15, 1, 0, MODE_SMA,PRICE_OPEN, BarIndex) = 1.25736

2012.12.05 15:16:24 VariousFunctionTest GBPJPY,H1: Next bar number: 38 date: 2012.06.13 15:45 iMA( CBEURUSD, 15, 1, 0, MODE_SMA,PRICE_OPEN, BarIndex) = 1.25740

2012.12.05 15:16:24 VariousFunctionTest GBPJPY,H1: Next bar number: 37 date: 2012.06.13 16:30 iMA( CBEURUSD, 15, 1, 0, MODE_SMA,PRICE_OPEN, BarIndex) = 1.25732

2012.12.05 15:16:24 VariousFunctionTest GBPJPY,H1: Starting date: 2012.06.13 16:30 Bar index= 37

 

Code snippet:

 Let me understand you: You loaded an indicator on a time base that read an offline chart right?

Can you use the code line I have not what you havefor obvious reasons that large time bases have little oscilaltions compared to the smallest time frame and test it this way from offline to offline and show me this code works via shots please by placing the indicator on the same block offline chart then to a lower block offline chart.

 
tradability:

Let me understand you: You loaded an indicator on a time base that read an offline chart right?

Can you use the code line I have not what you havefor obvious reasons that large time bases have little oscilaltions compared to the smallest time frame and test it this way from offline to offline and show me this code works via shots please by placing the indicator on the same block offline chart then to a lower block offline chart.

I'm not following what you are asking for ?  if I place this Indicator on an offline chart I have to force ticks upon it,  how are you doing that ?
 

RaptorUK:
I'm not following what you are asking for ?  if I place this Indicator on an offline chart I have to force ticks upon it,  how are you doing that ?

look at the attched snap shots.

 My aim is to display the indicator (1 bar moving average) shown on the 6 pip Renko Chart (Picture1, top) on a 1 pip Renko chart (Picture2, bottom). So, simply read one chart but place the data on the other.  

Want more clarification? 

 
tradability:

look at the attched snap shots.

 My aim is to display the indicator (1 bar moving average) shown on the 6 pip Renko Chart (Picture1, top) on a 1 pip Renko chart (Picture2, bottom). So, simply read one chart but place the data on the other.  

Want more clarification? 

OK,  so you are doing something like this ?

 iMA(NULL, 2, 1, 0, MODE_SMA, PRICE_OPEN, i);

 . . .  but even when you have the correct data how are you going to align the data from the M2 chart with the bars on the M8 chart ?  I know that the M2 and M8 are not real timeframes but I also don't expect that your bars will all the the same timestamps . . .  meaning  what is the time for bar number 10 on the M8 chart compared to bar 10 on the M2 chart ?

By he way,  a histogram draws a bar from 0 to the value you have placed in the buffer,  for price data use a line instead.

 
RaptorUK:

OK,  so you are doing something like this ?

 . . .  but even when you have the correct data how are you going to align the data from the M2 chart with the bars on the M8 chart ?  I know that the M2 and M8 are not real timeframes but I also don't expect that your bars will all the the same timestamps . . .  meaning  what is the time for bar number 10 on the M8 chart compared to bar 10 on the M2 chart ?

By he way,  a histogram draws a bar from 0 to the value you have placed in the buffer,  for price data use a line instead.

 

Each bar in M2 represents 6 bars in M8 so whats so hard to understand there? How will I know what is where? Simple look at the time of formation and the price with which it opens and closes.

Furthermore the line:

iMA(NULL, 2, 1, 0, MODE_SMA, PRICE_OPEN, i); 

 

....is what you told me works which is what i'm using BUT this is not woking .

 

 
tradability:

Each bar in M2 represents 6 bars in M8 so whats so hard to understand there? How will I know what is where? Simple look at the time of formation and the price with which it opens and closes.

Furthermore the line:

iMA(NULL210MODE_SMAPRICE_OPEN, i); 

 

....is what you told me works which is what i'm using BUT this is not woking .


OK,  so you are going to place one bar in the separate window for each group of 8 bars in the M2 chart ? and your index in the iMA call,  i,   is the M8 bar number divided by 8 somewhere in the code ?


In what way is the iMA call not working ?  how are you testing the return value ?  are you outputting the index value and corresponding datetime so you can check if the returned value is correct or incorrect ? 

 
RaptorUK:


OK,  so you are going to place one bar in the separate window for each group of 8 bars in the M2 chart ? and your index in the iMA call,  i,   is the M8 bar number divided by 8 somewhere in the code ?


In what way is the iMA call not working ?  how are you testing the return value ?  are you outputting the index value and corresponding datetime so you can check if the returned value is correct or incorrect ? 

 

 

The way I am testing is by looking at the 6 pip chart and comparing the 1 pip chart. i.e the last 2 bars of the 6 pip are red hence I expect the last 12 bars + possibly up to 5 more bars formed (this accounts for a current forming but not yet complete bar in the 6 pip bar chart) in the 1 pip chat to be red. Are they red? NO hence what is being read by the 1 pip chart does not match what is in the 6 pip chart. I continue this pattern backwards.

Am I wrong in doing so?  

 
tradability:

The way I am testing is by looking at the 6 pip chart and comparing the 1 pip chart. i.e the last 2 bars of the 6 pip are red hence I expect the last 12 bars + possibly up to 5 more bars formed (this accounts for a current forming but not yet complete bar in the 6 pip bar chart) in the 1 pip chat to be red. Are they red? NO hence what is being read by the 1 pip chart does not match what is in the 6 pip chart. I continue this pattern backwards.

Am I wrong in doing so?

You have to test your code at each stage . . . not just the end . .  to find any errors.  First check that the value returned from the iMA() call is correct,  then check the next step then the next, etc.
Reason: