Add free ( manual ) Trend Line to indicator window

 

Can You help me how to add simply Trend Line ( to manual set ) to separate indicator window ... f.ex. RSI

I tried this standard code, but I have no idea how to make it work ( display )

ObjectCreate("TLineName", OBJ_TREND, 0,Time[25], Bid, Time[0], Ask);

ObjectSet("TLineName", OBJPROP_WIDTH,2);

ObjectSet("TLineName", OBJPROP_COLOR, Red);

Read this thread https://www.mql5.com/en/forum/178733/page55

Please help...

 
MarcinFX:
Can You help me how to add simply Trend Line ( to manual set ) to separate indicator window ... f.ex. RSI

I tried this standard code, but I have no idea how to make it work ( display )

ObjectCreate("TLineName", OBJ_TREND, 0,Time[25], Bid, Time[0], Ask);

ObjectSet("TLineName", OBJPROP_WIDTH,2);

ObjectSet("TLineName", OBJPROP_COLOR, Red);

Read this thread https://www.mql5.com/en/forum/178733/page55

Please help...

Hi MarcinFX,

Not sure what you mean by..."to manual set" a trend line...?

Do you mean just drawing a manual line in the indicator...or adding code that draws it for you...?

If you are learning how to code and want to see how it's done...check out any Divergence indicators here on Forex TSD...

Most have options to select displaying the divergence lines in either or both the indicator and on the chart...

Then you can find the code that displays the lines in the separate indicator window...and use that with your indicator.

Otherwise someone here may be able to help you with your request.

Hope this helps,

Robert

 
cosmiclifeform:
Hi MarcinFX,

Not sure what you mean by..."to manual set" a trend line...?

Do you mean just drawing a manual line in the indicator...or adding code that draws it for you...?

If you are learning how to code and want to see how it's done...check out any Divergence indicators here on Forex TSD...

Most have options to select displaying the divergence lines in either or both the indicator and on the chart...

Then you can find the code that displays the lines in the separate indicator window...and use that with your indicator.

Otherwise someone here may be able to help you with your request.

Hope this helps,

Robert

... I want to add code that draws Trendline I can modify manually, independent of the indicator's value. BTW I did it. Found many indicators like RSI-TL, but all they based on the indicator values. .... Thanks for advice.

 

I did it. Thanks for inspiration

 
marcinfx #:

I did it. Thanks for inspiration

Can you please share it with us, I would like to see your code.

Reason: