closed

Back to topics list To post a new topic, please log in or register
avatar
16
tazosmr 2015.10.29 19:48
 
cloise the topic
avatar
3134
qjol 2015.10.29 22:26 #
 

the code can't even pass compiler

'#' - invalid preprocessor command !Test.mq4 8 1
'#' - expressions are not allowed on a global scope !Test.mq4 8 1
possible use of uninitialized variable 'prev_day' !Test.mq4 30 13
declaration of 'High' hides predefined variable !Test.mq4 31 16
declaration of 'Low' hides predefined variable !Test.mq4 32 16
2 error(s), 3 warning(s) 3 4

avatar
16
tazosmr 2015.10.30 01:25 #
 
qjol:

the code can't even pass compiler

'#' - invalid preprocessor command !Test.mq4 8 1
'#' - expressions are not allowed on a global scope !Test.mq4 8 1
possible use of uninitialized variable 'prev_day' !Test.mq4 30 13
declaration of 'High' hides predefined variable !Test.mq4 31 16
declaration of 'Low' hides predefined variable !Test.mq4 32 16
2 error(s), 3 warning(s) 3 4

please recheck again. i have updated it..
avatar
3134
qjol 2015.10.30 04:44 #
 

you are on the 10 min. period TF and you want to see the H & L from all the other TF on that chart ?

if so you have to use for every TF 2 Buffers example:

    //1 Min TF
    SetIndexBuffer(0,PREV_L_1Min_Buferrr,INDICATOR_DATA);    SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1,clrWhite);
    SetIndexBuffer(1,PREV_H_1Min_Buferrr,INDICATOR_DATA);    SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1,clrWhite);
    //5 Min TF
    SetIndexBuffer(2,PREV_L_5Min_Buferrr,INDICATOR_DATA);    SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,1,clrWhite);
    SetIndexBuffer(3,PREV_H_5Min_Buferrr,INDICATOR_DATA);    SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,1,clrWhite);

    ...
    ...
    
    ...
    ...
    //Last one MN TF
    SetIndexBuffer(y,PREV_L_MN_Buferrr,INDICATOR_DATA);    SetIndexStyle(y,DRAW_LINE,STYLE_SOLID,1,clrWhite);
    SetIndexBuffer(z,PREV_H_MN_Buferrr,INDICATOR_DATA);    SetIndexStyle(z,DRAW_LINE,STYLE_SOLID,1,clrWhite);

 

and of course you have to adjust (write) the code on OnCalculate for every buffer

avatar
16
tazosmr 2015.10.30 08:59 #
 
please,just give me an example... I DONT WANT ALL timeframes at once.. just,i want to draw i.e. 4HRS high/low lines on 10 min chart..
avatar
3134
qjol 2015.10.30 13:08 #
 

then all you have to do is:

input ENUM_TIMEFRAMES AggregationPeriod = PERIOD_H4;

 

or change in the input to whatever TF you want

  

avatar
16
tazosmr 2015.10.30 15:47 #
 
qjol:

then all you have to do is:

 

or change in the input to whatever TF you want

  

thank qjol, however, you have misunderstood the topic and answered quite different thing. anyway thanks..


p.s. i am asking about how to plot lines. i could not explain more clearly than i did. :(

i want to show lines of any period ( i choose) on the chart, and how is formula to plot the different tiemframe lines.. (i.e. if i choose WEEKLY, or 4HR or whatever timeframe i choose) then i want to see the WEEKLY(or 4HR or etc..)  HIGH and LOW lines on the 10 min chart.. .

avatar
3134
qjol 2015.11.01 06:34 #
 

you meant on the chart itself and not on a separate window ?

#property indicator_chart_window

 

avatar
16
Back to topics list  

To add comments, please log in or register