[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Trendlines witth TD-Points


  • Date: Sat, 05 Dec 2009 18:55:01 -0000
  • From: "cichy1235" <cichy1235@xxxxxxxx>
  • Subject: [amibroker] Trendlines witth TD-Points

PureBytes Links

Trading Reference Links

Here is the base code, that i would like to change:

PercH = Param("Percent H", 3, 0.25 , 10, 0.25); 
PercL = Param("Percent L", 3, 0.25 , 10, 0.25);

UP = Peak(H,PercH,1) + ((((Peak(H,PercH,1)-Peak(H,PercH,2)) /
(PeakBars(H,PercH,2)-PeakBars(H,PercH,1))) * PeakBars(H,PercH,1)));

DOWN = Trough(L,PercL,1) + ((((Trough(L,PercL,1)-Trough(L,PercL,2)) /
(TroughBars(L,PercL,2)-TroughBars(L,PercL,1))) * TroughBars(L,PercL,1)));

Plot(Close, "Close",colorBlack, styleCandle);
Plot(UP,"UP",colorGreen, styleLine);
Plot(doWN,"DOWN", colorRed,styleLine);

In this code i would like to replace the Peaks and Troughs as a TD-Points as follow:

TD_point_UP = H > Ref(H,-1) AND H > Ref(H,1) ;
TD_point_DOWN = L < Ref(L,-1) AND L < Ref(L,1) ;

What is the proper code for this change (with a visible UP & DOWN lines for all the period - from the first to the last TD-point)???





------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/