Tomasz,
Sure the question was about plotting, But how you come to the data that 
is plotted may well vary.
The examples you give, All do the same thing. Shift the plot out of sync 
with the price. Useful on it's own merits.
The example I gave, Does something different. (The MA is in sync with 
the price, and calculates/plots into the future)
Though, in retrospect - I should have pointed to the "X-Shift function" 
and "Plot" functions which cite examples.
Then given my example (below).
    Michael.

SECTION_BEGIN("Future MA");
// Plot Future MA.
Fwd = Param( "Fwd Period", 5, -50, 50 );
FwdC = Ref(Close,Fwd);
FwdMA = MA(FwdC,Fwd);
Plot(C,"Close",colorBlack,styleLine,0,0,-Fwd);
Plot(FwdC,"FwdClose",colorRed,styleLine);
Plot(FwdMA,"FwdMA",colorGreen,styleLine);
_SECTION_END();







Tomasz Janeczko wrote:
>
> The question was about PLOTTING.
>
> And yes you CAN draw indicator into future bars. AmiBroker is shipped
> with DISPLACED MOVING AVERAGE sample formula that shows how to do that:
> Displacement is controlled by "Displacement" parameter.
> You can dynamically adjust it using Parameters window.
>
> P = ParamField("Field");
> Type = ParamList("Type", "Simple,Exponential,Double 
> Exponential,Tripple Exponential,Wilders,Weighted");
> Periods = Param("Periods", 30, 2, 100 );
> 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), styleLine, 
> 0, 0, Displacement );
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "Michael.S.G." <[EMAIL PROTECTED] 
> <mailto:OzFalconAB%40GMail.Com>>
> To: <[email protected] <mailto:amibroker%40yahoogroups.com>>
> Sent: Saturday, July 29, 2006 2:52 AM
> Subject: Re: [amibroker] Future Bar ?
>
> > You can not call on future bars that do not exist.
> > This is a real shame, Because it would be VERY handy.
> > Example:
> > The basic stock goes upto bar 200.
> > And you have a (related) artificial ticker calculated with future
> > data. (Say, calculated in excel and imported into AB).
> > The artificial ticker goes to bar 250.
> >
> > Unfortunatly, you can NOT select your basic stock and be able to "see"
> > any of the artificial tickers "Future" data.
> > You are limited to the last bar of the selected stock. Unless you 
> import
> > "Fake" empty data into every stock. (Which is realy a bad idea)
> >
> > Anyway, There is small functionality in the ShiftX and Ref() functions.
> > And here is an example of how you can shift the prices back then calc
> > and display a MA into the 'future'. (It's not actualy a 'future' bar,
> > It's just the current bar with the prices shifted back).
> >
> > All the best,
> > Michael.
> >
> >
> >
> > angus_83210 wrote:
> >>
> >> Is there a way to draw an indicator 2 to 3 bars into the future with
> >> amibroker? I have an indicator that I would like to draw 1- 3 bars
> >> into the future on the price chart.
> >>
> >> Thanks
> >>
> >> Robert
> >>
> >
> >
>



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:
    [EMAIL PROTECTED]

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



Reply via email to