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

Re: [amibroker] Graphing beyond the data



PureBytes Links

Trading Reference Links

You guys really don't see the light at the end of tunnel.
You need to think OUTSIDE THE BOX.
 
Shifting and Extending is fundamentally THE SAME
(The end effect is identical).
 
You need to DROP the relationship of bar vs time.
It does not matter.
 
It is completely irrelevant what timestamp given bar has.
 
Say you need to calculate TOMMORROWS value
using close value of today, yesterday and day before yesterday:
 
Y[ tommorrow ] = m * C[ today ] + n * C[ yesterday ] + p * C[ day before yesterday ].
 
So tommorrows value in AFL language would be:
 
Y TOMMORROW  = m * Close + n * Ref( Close, -1 ) + p * Ref( Close, -2 );
 
And such tommorrows value can be plotted using XShift feature (just specify XShift=1)
 
Give me ANY practical problem you got with plotting into the future and I will show you
how to implement in AFL.
 
Wavemechanic: you are using wrong code. Extending is not just adding xSHIFT to Plot() 
If you want to extend you need to have calculation corresponding to the fact
that you will be shifting the plot later!
 
The following formula DEMONSTRATES how to do that. Note that extension is
provided as PARAMETER so you can see that plot can be extended into the future
without changing sine wave.
 
Var1 = Param( "Var1", 0.2, 0, 1, 0.01 );
Extend =
Param("How many bars to extend", 0, 0, 30, 1
);
x =
sin( Cum
( Var1 ) + Extend * Var1 );
Plot( x, "", colorRed, styleLine, Null, Null
, Extend );
Plot( C, "", colorPaleGreen, styleBar | styleOwnScale );
 
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Monday, January 05, 2009 10:40 PM
Subject: Re: [amibroker] Graphing beyond the data

Bill,
 
I agree with you....even from the example that Tomasz provided...I see it as just shifting the current plot to the right....
not actually calculating some future values and then plotting them to the right of the last value....
 
In the example...if you remove the 25 from the plot statement
 
Plot( me52,"S1", IIf( Avg26_9 > me52,colorOrange,colorBlueGrey),styleCloud,Null,Null,25);
 
It will move / shift the plot back to the left...
 
Anthony
 
 
----- Original Message -----
Sent: Monday, January 05, 2009 4:23 PM
Subject: Re: [amibroker] Graphing beyond the data

TJ,
 
I don't think we are talking about the same thing perhaps because of our understanding of the words "shift" and "extend".  To me "shift" means to move to the right into the blank space and "extend" means to calculate new values in the blank space. 
 
The problem as I see it is shown in the screen shot below (bars are included for counting purposes).  Two charts of a sine curve in which one is shifted with Plot() by 10 bars into the blank space.  By the definitions above, if the curve is simply shifted the last value will remain unchanged (as shown) whereas an extended curve would have a last value around 1 rather than -1.  
 
Based on the definitions above, I view these charts as evidence that Plot() shifts the curve and does not calculate what the value should be 10 bars into the future.  As far as I can tell, the "extend" parameter in LineArray() actually does extend into the future as do the charting tools. 
 
Definitions aside, am I using Plot() correctly or is there a way to use Plot() in order to get what I call "extend" functionality.  The type of functionality is what is needed for a variety of studies of the type shown in the TradeStation screen shots.
 
Bill
 
----- Original Message -----
Sent: Monday, January 05, 2009 2:38 PM
Subject: Re: [amibroker] Graphing beyond the data

No I did not miss the point.
 
The supported way to EXTEND indicators is to calculate them as usual and
plot using XShift.  In this approach you are using LAST X bars of array
as "future" bars. Then to actually display these future bars at correct place
you use XShift.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Monday, January 05, 2009 7:40 PM
Subject: Re: [amibroker] Graphing beyond the data

TJ,
 
I think you missed the point.  The problem is one of extension not shifting which Plot() cannot handle.  Extending indicators, as Robert and many of us want to do, is necessary to identify future values for a variety of studies, including Hurst channel projections, cycles, etc.  Here are TradeStation examples showing the extension of the analysis (not a shift) into the future.
 
Bill
 
 
 
 
 
 
 
 
 
----- Original Message -----
Sent: Monday, January 05, 2009 10:10 AM
Subject: Re: [amibroker] Graphing beyond the data

Hello,

You can do that using XShift parameter of Plot() function
http://www.amibroker.com/f?plot

For coding example, see DispMA (displaced moving average)
that is shipped with AmiBroker

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Robert" <disqplay0@xxxxxxcom>
To: <amibroker@xxxxxxxxxps.com>
Sent: Monday, January 05, 2009 3:25 PM
Subject: [amibroker] Graphing beyond the data


>I have been working on an indicator that would look into the futur if
> the trend continues or if it reverses. It will graph to the last day
> of data but I am presently looking at a five day look ahead. Is there
> a way to graph the pridicted price beyond the last data point? If so
> a shove in the right direction would help. Not really sure how to do
> this but would like to learn, thanks in advance for any support you
> can give to this question.
>
> Disq
>
>
>
> ------------------------------------
>
> **** IMPORTANT ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> *********************
> TO GET TECHNICAL 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
>
>
>

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

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

*********************
TO GET TECHNICAL 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@xxxxxxxxxps.com
    mailto:amibroker-fullfeatured@yahoogroups.com

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

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



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.2/1876 - Release Date: 1/5/2009 9:44 AM



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.2/1876 - Release Date: 1/5/2009 9:44 AM



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.2/1876 - Release Date: 1/5/2009 9:44 AM
__._,_.___

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

*********************
TO GET TECHNICAL 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

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___