![]() |
Guppy Trend Volatility Line Bullscript |
Post Reply ![]() |
Author | |
Bana ![]() Regular ![]() ![]() Joined: 02 Jan 2007 Location: Australia Posts: 46 |
![]() ![]() ![]() ![]() Posted: 04 May 2010 at 4:12pm |
Thanks for the coding.
Cheers
|
|
![]() |
|
maximo ![]() BullCharts Guru ![]() ![]() Joined: 02 Sep 2006 Location: Australia Posts: 232 |
![]() ![]() ![]() ![]() |
That's some pretty fancy coding there, thanks :)
|
|
![]() |
|
TheFerret ![]() Newbie ![]() ![]() Joined: 18 Aug 2007 Posts: 9 |
![]() ![]() ![]() ![]() |
Hi Everyone,
just wanted to share some code I wrote for the Guppy Trend Volatility Line Stop Loss. Just enter the date you bought it and the break even price(including brokerage, this is usually a few clicks more than your buy price.)The stop zig zags between the 30 and 60 ema by default and as such you should have the Guppy LT and ST GMMA on your screen as well, but you may find a different pair of ema's that better define your trend and use them. I haven't tested it with falling trends but it appears to work with them as well. [description=This indicator uses the Guppy GMMA and TVL.] [citation=Daryl Guppy. Programming by The Surferret] [category=Stop Loss] [target=Price] [name=TVL Stop] [Width=2] [color=black] PDate := inputdate("Date"); ma1 := input("EMA short", 30, 1, 200); ma2 := input("EMA long", 60, 1, 200); cost := input("Breakeven Cost", 0, 0, 9999); m1:= ma(c,ma1,e); m2:=ma(c,ma2,e); prevm1:=ma(hist(c,1),ma1,e); prevm2:=ma(hist(c,1),ma2,e); if(now<PDate,cost, if(now=PDate,if(cost<=m2,m1,cost), if(m1 > m2 and previous < m2,((m1-prevm1)*(previous-prevm2)/(m2-prevm2))+prevm1, if(m1 < m2 and previous > m2,((m1-prevm1)*(previous-prevm2)/(m2-prevm2))+prevm1, previous)))); All the best, The Surferret |
|
![]() |
Post Reply ![]() |
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |