Trendline / channel indi for subwindow

 

Hi all,

Does anybody use/have a shi-channel or a trendline indicator which can draw channels/trendlines in a subwindow. For example, I have an RSI candle chart in subwindow 1 and would like to have an indicator which would draw automatically trendlines on the RSI. I tried to make the existing shi-channel indi go into the subwindow but my limited coding knowledge/experience does not seem to do me any favours for the moment. mq4 and mq5 are both welcome.

I attach a snapshot to describe. Of course, the blue channel and the magenta trendline are drawn by hand... I wish they were drawn automatically by an indi, for each individual timeframe.

Thanks in advance for sharing.

Files:
Capture.PNG  102 kb
 
dabiel6:

Hi all,

Does anybody use/have a shi-channel or a trendline indicator which can draw channels/trendlines in a subwindow. For example, I have an RSI candle chart in subwindow 1 and would like to have an indicator which would draw automatically trendlines on the RSI. I tried to make the existing shi-channel indi go into the subwindow but my limited coding knowledge/experience does not seem to do me any favours for the moment. mq4 and mq5 are both welcome.

I attach a snapshot to describe. Of course, the blue channel and the magenta trendline are drawn by hand... I wish they were drawn automatically by an indi, for each individual timeframe.

Thanks in advance for sharing.

That can not be done automatically without changing the indicator (neither in mt4 nor in mt5)
 
mladen:
That can not be done automatically without changing the indicator (neither in mt4 nor in mt5)

Well, I thought, as both charts are candle charts, they could both feed the indicator in the same way and that coding would be largely similar... I have come accross several divergence indicators where one and the same indicator would draw divergent trendlines in both the main and in the subwindow... and thought that this was easy-peasy to code...:-)... Looks like I will need to keep doing them manually then... Thanks again for the prompt answer.

 


Hi

I have a similar question, i know how to code a trend line to draw on the chart. But i can get the code to draw a trend line on my stochastic indicator.

below is the code, any suggestion would be great . 

Thanks


//--- Stochastic Trend Line 
           double S1_time1 = D'2019.03.08 07:00';
           double S1_price1 = 10.194175; //Stoch value
           double S1_time2 = D'2019.03.08 16:00';
           double S1_price2 = 80.097087;  //Stoch value

            ObjectCreate("subTrend",OBJ_TREND,1,S1_time1,S1_price1,S1_time2,S1_price2);
            ObjectSet("subTrend", OBJPROP_PRICE1,S1_price1);
            ObjectSet("subTrend", OBJPROP_PRICE2, S1_price2);
            ObjectSet("subTrend",OBJPROP_RAY,0);
            
            ObjectSetInteger(1,"subTrend",OBJPROP_WIDTH,3);
            ObjectSetInteger(1,"subTrend",OBJPROP_COLOR,clrBlue);
            ObjectSetInteger(1,"subTrend",OBJPROP_STYLE,STYLE_SOLID);  
Reason: