In the screenshot below I have a Price Barchart with its values on the Right Axis and an indicator (CCI ploted in Magenta) with its values in the Left Axis. The PL code below plots the Trendline in Cyan at value 116 based on the Price Barchart values.
My question is how do I modify the PL code (shown below)so it plots the Trendline based on the CCI values? In other words I want to plot the Line based on the CCI value ... that is at the 116 CCI value where the red arrow is shown in the screenshot and not at 116 Price value where the cyan line is ploted.
Thanks
If LastBarOnChart then Value5 = TL_New ( D, T, 116, D[100], T[100], 116);
Plotting CCI TLine
-
- Posts: 80
- Joined: 02 Feb 2010
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Plotting CCI TLine
if it is a straight line you want,In the screenshot below I have a Price Barchart with its values on the Right Axis and an indicator (CCI ploted in Magenta) with its values in the Left Axis. The PL code below plots the Trendline in Cyan at value 116 based on the Price Barchart values.
My question is how do I modify the PL code (shown below)so it plots the Trendline based on the CCI values? In other words I want to plot the Line based on the CCI value ... that is at the 116 CCI value where the red arrow is shown in the screenshot and not at 116 Price value where the cyan line is ploted.
Thanks
If LastBarOnChart then Value5 = TL_New ( D, T, 116, D[100], T[100], 116);
the easiest way is simply to use PLOT.
Code: Select all
plot100( 116, "line");
if you want to draw a trendline in a subchart, you have to use the keyword TL_NEW_SELF.
Code: Select all
If LastBarOnChart then Value5 = TL_New_self ( D, T, 116, D[100], T[100], 116);
-
- Posts: 80
- Joined: 02 Feb 2010
Re: Plotting CCI TLine
Thanks,
I like the second option
but when I insert the indicator in the chart it does not plot the Trendline at all. Am I missing something?
Thanks
I like the second option
Code: Select all
If LastBarOnChart then Value5 = TL_New_self ( D, T, 116, D[100], T[100], 116);
Thanks
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Plotting CCI TLine
If you need more help, you have to give more information.Thanks,
I like the second option
but when I insert the indicator in the chart it does not plot the Trendline at all. Am I missing something?Code: Select all
If LastBarOnChart then Value5 = TL_New_self ( D, T, 116, D[100], T[100], 116);
Thanks
A line by itself is only a line by itself, you have to look at the whole picture for a total solution:
eg. what instrument are you applying this into? what is the chart resolution? what is your code? how do you insert this into your code? etc. Any one of the above items can/may affect the outcome.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Plotting CCI TLine
Please answer TJ's questions in order us to get more information regarding the issue or please come to our live chat Monday-Friday 6:30 am - 2 pm EST. We will do our best to help you.