Jump to content

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

Recommended Posts

Posted

Can anyone please help me to add a description automatically to a trend-line in a piece of code ? The following code draws trend line's on your chart :-

 

ObjectCreate("TL1", OBJ_TREND, 0, T2, PP + Step*AB, T1, PP);

ObjectSet("TL1", OBJPROP_COLOR, Silver);

ObjectSet("TL1", OBJPROP_WIDTH, 1);

ObjectSet("TL1", OBJPROP_STYLE, STYLE_SOLID);

ObjectCreate("TL2", OBJ_TREND, 0, T2, P2, T1, P1);

ObjectSet("TL2", OBJPROP_COLOR, Silver); a

ObjectSet("TL2", OBJPROP_WIDTH, 1);

ObjectSet("TL2", OBJPROP_STYLE, STYLE_SOLID);

ObjectCreate("MIDL", OBJ_TREND, 0, T2, (P2 + PP + Step*AB) / 2, T1, (P1 + PP) / 2);

ObjectSet("MIDL", OBJPROP_COLOR, Silver);

ObjectSet("MIDL", OBJPROP_WIDTH, 1);

ObjectSet("MIDL", OBJPROP_STYLE, STYLE_DOT);

Comment(" Channel size = ", DoubleToStr(MathAbs(PP - P1) / Point, 0), " Slope = ",

DoubleToStr(-Step / Point, 2));

 

If you click on the properties of the trend line on the chart it displays T1 + T2, I need to modify the code to add some pre defined text into the description properties of the trend line, so every time it re-draws the description is still there ?

 

Thanks in advance :-)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

×
×
  • Create New...