Trading signal based on Manual trendline
Author: P_Cherry
Creation Date: 3/25/2010 6:10 AM
profile picture

P_Cherry

#1
Hi,
I am going through program possibilities. I know it is possible to draw trend line manually. I would like to base strategy on this trend line. It means to buy only if the manually drawn trend line / channel has positive slope etc...

How can I make this condition in script?
Thanks for advise
Peter
profile picture

Eugene

#2
See TrendlineValue in the QuickRef.
profile picture

P_Cherry

#3
Thanks, I knew about this interaction between trend line and condition. But this is only about if the price is under or above trend line. I am interested in slope of the trend line (buy only if the trend line is going up).
profile picture

Eugene

#4
How about getting the TrendLineValue values on the current bar and some bars ago, making sure the values aren't null, and computing the slope?
profile picture

P_Cherry

#5
Good idea:) I will try to fight with it:)
profile picture

P_Cherry

#6
just one question....my strategy is based on intra-day data, but I would like to use Trend-line drawn on daily data. How can I access trend-line value from different scale?
profile picture

Cone

#7
There isn't a direct way to get it; and it would take some work to figure out an indirect way.

TrendlineValue really needs to be more user-friendly, and this request is just another reason to ask for an enhancement for this function. (Another reason is the inability to access TrendlineValues for secondary symbols, as detailed in the QuickRef.)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).