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

[amibroker] Re: TimeFrames: Is their use flawed?



PureBytes Links

Trading Reference Links

To visualize the difference between the "Traditional" method and the "Jorgen" method when calculating MA run the following script on let's say 1min chart (higher timeframe set to 15min by default):

TF = Param(" Higher Timeframe",15,2,60,1);
Period = Param("MA Period",10,2,50,1);

Jorgen_MA = Null;

TimeFrameSet(in1Minute * TF);
BI_TF = BarIndex();	
Close_TF = Close;
MA_TF = MA(Close_TF,Period);
Sum_TF = Sum(Close_TF,Period - 1);

TimeFrameRestore();
CLOSE_TF_Base = TimeFrameExpand(Close_TF,in1Minute * TF);
BI_TF_Base = TimeFrameExpand(BI_TF,in1Minute * TF);
TF_Bar = IIf(BI_TF_Base != Ref(BI_TF_Base,-1),1,0);

MA_TF_Base = TimeFrameExpand(MA_TF,in1Minute * TF);
Sum_TF_Base = TimeFrameExpand(Sum_TF,in1Minute * TF);

Jorgen_MA = (Sum_TF_Base + Close) / Period;

Plot(CLOSE_TF_Base,"TF", colorRed);
Plot(MA_TF_Base,"MA_TF", colorYellow);
Plot(Jorgen_MA,"JMA", colorBrightGreen);

Height = Param("TF Bar Height as % of Y axis",10, 2, 100, 1) ;
Plot(TF_Bar,"",colorBlue,styleOwnScale|styleHistogram,Height);

AF 




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

**** 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:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto: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/