I need my code to affect some trendline created by an indicator, but not the trendline created by another one.
How can I get the Origin of a trend line? I know that I could use the TL_Getfirst(Origin) and loop but is there a way to find it directly?
Martin
Found the Origin of a trendline: [SOLVED]
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
I need my code to affect some trendline created by an indicator, but not the trendline created by another one.
How can I get the Origin of a trend line? I know that I could use the TL_Getfirst(Origin) and loop but is there a way to find it directly?
Martin
You need to make an illustration.
Modifying the style of a trendline is affecting the style of the default trendline style.
The goal is to toggle the style of a trendline created by a given indicator from a solid line to a dot line .
Doing so, it is affecting the default style when I manually draw a trendline.
The goal is to toggle the style of a trendline created by a given indicator from a solid line to a dot line .
Doing so, it is affecting the default style when I manually draw a trendline.
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
Thanks for the illustration...
but I am getting a headache.
but I am getting a headache.
I think I resolve the problem
I was doing a validation with a function. Testing if the next draw trendilne number was the same of TL_GetNext(TlNumber -1, 1)
I put the code in my Main indicator and the problem seem to be resolve.
I was doing a validation with a function. Testing if the next draw trendilne number was the same of TL_GetNext(TlNumber -1, 1)
I put the code in my Main indicator and the problem seem to be resolve.
Code: Select all
Input:
TL_Num (NumericSimple);
Var:
TL_Prev (Tl_Num-1),
TL_Next (0);
ValidTrendline = False;
TL_Next = TL_GetNext(TL_Prev,1);
If TL_Next = TL_Num then ValidTrendline = True else ValidTrendline = False;