PureBytes Links
Trading Reference Links
|
Hello,
EMA has recursive formulation. It means that ALL bars influence the final value
(not only N-most recent bars as in the case of SIMPLE moving average).
The side effect of it is that value of EMA depends on NUMBER OF BARS
included in the calculation. If it changes - you will get different results.
If you change base time frame and the number of bars included in the calculation
may change (especially when we consider INDICATOR code) because
number of VISIBLE bar changes and indicators use not all but visible bars
(plus some more) - i.e use QuickAFL feature.
See this how to disable quick afl
http://www.amibroker.com/f?setbarsrequired
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Alan" <firehorse888uk@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, February 06, 2006 9:45 PM
Subject: Re: [amibroker] Different daily EMA values when viewed from lower timeframes?
> Hi Ara,
>
> I've tried putting in expand first.
> Now I get
>
> daily - 1.2040
> 4hr - 1.20199
> 1hr - 1.20179
> 15min - 1.2018
> 5 min - 1.2018
> 1 min - 1.2018
>
> I've got pivot formulas using the close at the end of the day expanded
> with expandfirst and they seem to work fine because they stay constant
> when you go to a lower timeframe.
>
> I don't understand why when it it is an EMA it changes, and how do I
> make it constant?
>
> Thanks
> Alan
>
>
> Ara Kaloustian wrote:
>
>>When you create longer timeframe indicators, you use either "expandfirst" or
>>"expand last" parameters.
>>
>>"Expandfirst" will "look forward" to the end of the period. For example if
>>you are doing a 5 period expansion, then if the 1st regular period is
>>higher, the entire expanded 5 period bar will be high ... which can changes
>>in the next 4 bars.
>>
>>
>>----- Original Message -----
>>From: "firehorse888uk" <firehorse888uk@xxxxxxxxxxx>
>>To: <amibroker@xxxxxxxxxxxxxxx>
>>Sent: Monday, February 06, 2006 8:55 AM
>>Subject: [amibroker] Different daily EMA values when viewed from lower
>>timeframes?
>>
>>
>>
>>>Hi,
>>>
>>>Could someone explain why when viewed from a lower timeframe, why my
>>>daily ema values keep changing?
>>>
>>>I'm using forexite minute data.
>>>
>>>At the end of friday 21:00
>>>Daily EMA(C,2) = 1.20836
>>>When I change the intervals I'm viewing it at it changes.
>>>4hr - 1.20224
>>>1hr - 1.20178
>>>15min - 1.2018
>>>5min - 1.20181
>>>1min - 1.2018
>>>
>>>By using the timeframeset and restore to get the daily ema(c,2) value,
>>>I would have expected it to remain constant. I've attached the code
>>>I'm using.
>>>
>>>Has anyone got a better understanding to explain?
>>>
>>>Thanks
>>>Alan
>>>
>>>P = ParamField("Price field",-1);
>>>EMA1Per = Param("EMA1 Period", 02, 2, 1000, 1, 10 );
>>>EMA2Per = Param("EMA2 Period", 28, 2, 1000, 1, 10 );
>>>EMA1Col = ParamColor( "EMA1 Colour", colorRed);
>>>EMA2Col = ParamColor( "EMA2 Colour", colorBlue);
>>>
>>>Timeframe = inDaily;
>>>
>>>TimeFrameSet(Timeframe );
>>>EMA_Line1 = EMA( P, EMA1Per );
>>>EMA_Line2 = EMA( P, EMA2Per );
>>>TimeFrameRestore();
>>>
>>>EMALine1= TimeFrameExpand(EMA_Line1, Timeframe );
>>>EMALine2= TimeFrameExpand(EMA_Line2, Timeframe );
>>>
>>>AddColumn(EMALine1,"EMA1",1.4);
>>>AddColumn(EMALine2,"EMA2",1.4);
>>>
>>>Plot( EMALine1 + 0.0000, "EMA1", EMA1Col,styleNoRescale);
>>>Plot( EMALine2 + 0.0000, "EMA2", EMA2Col,styleNoRescale);
>>>
>>>Filter=1;
>>>
>>>
>>>
>>>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|