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

Re: [amibroker] ref(x, 1)



PureBytes Links

Trading Reference Links

Hello,

It returns last value. In other words, you can't look into "future" values.

It is however possible to PLOT into the future "blank" space,
by means of XShift parameter.

DispMA shipped with AmiBroker shows how:

P = ParamField("Field"); 
Type = ParamList("Type", "Simple,Exponential,Double Exponential,Tripple Exponential,Wilders,Weighted"); 
Periods = Param("Periods", 30, 2, 300 ); 
Displacement = Param("Displacement", 15, -50, 50 ); 
m = 0; 

if( Type == "Simple" )                m = MA( P, Periods ); 
if( Type == "Exponential" )          m = EMA( P, Periods ); 
if( Type == "Double Exponential" )    m = DEMA( P, Periods ); 
if( Type == "Tripple Exponential" )    m = TEMA( P, Periods ); 
if( Type == "Wilders" )             m = Wilders( P, Periods ); 
if( Type == "Weighted" )             m = WMA( P, Periods ); 

Plot( m, _DEFAULT_NAME(), ParamColor("Color", ColorCycle), ParamStyle("Style"), 0, 0, Displacement ); 


Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "John Bollinger" <BBands@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, July 22, 2008 12:09 AM
Subject: [amibroker] ref(x, 1)


> Good evening,
> 
> What does ref(x, n) see at the right edge of the chart when n is a
> positive integer?
> 
> Which is to ask, what does ref(Close, 1) return on the last bar?
> 
> NO, I am not trying to see tomorrow's paper today.
> 
> From another angle: When I am on the last bar can can I reference
> future values of an indicator, say a centered moving average or
> another series I have created that has future values?
> 
>     jab
> 
> 
> ------------------------------------
> 
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> Yahoo! Groups Links
> 
> 
> 

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

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> 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/