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

[amibroker] Re: intraday % change



PureBytes Links

Trading Reference Links

I believe TimeFrameGetPrice inDaily is what I was looking for, but I haven't tested it yet.

Thanks Patrick.

--- In amibroker@xxxxxxxxxxxxxxx, "NW Trader" <pk47hargus@xxx> wrote:
>
> Hi Mathew,
> 
> Yes it is simple, and my response wasn't complicated; that's the math you use to look for the % delta of the close from a one period to another.  In the originally supplied code, the only change required is if you wanted to look back more than one period, the default period is one.  But as I wrote, if all you want is to look back to the prior period close, substitute 1 for P in the AddColumn statement. If you want even simpler try this:
> 
> AddColumn(((C-Ref(C,-1))/Ref(C,-1)*100,"% Change from Prior Close", 3.2, colorblack,colorwhite);
> 
> You only asked for the change from the prior close but from your subject line I infer that you want it as of some intraday time (though your original question didn't specify that).  This code will report the change from the prior day's close to the current latest close in your data (intraday or end of day) when run as a daily timeframe (or week over week on weekly, hour over hour on hourly, etc.).  Now if you are working with minute bars reporting other results in your exploration and want the change from the prior day's close, that's different. I leave it to you to learn some afl programming to find the answer if you want to run it in minute timeframes (hint: look in the help file for inDaily).  {Gratuitous other suggestion: put the calculation in a chart title and watch it change as the data comes in.} Share your learning if you do.
> 
> Peace and Justice   ---   Patrick
>   ----- Original Message ----- 
>   From: matthewkho 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Thursday, October 22, 2009 6:27 PM
>   Subject: [amibroker] Re: intraday % change
> 
> 
>   Patrick, that solution is quite involved. It even requires me to manually, intelligently change the periods every time..
> 
>   there must be a better way to do this? I imagine many others are interested in this for intraday trading.. should be a simple problem
> 
> 
>   --- In amibroker@xxxxxxxxxxxxxxx, "NW Trader" <ta4charts@> wrote:
>   >
>   > Hi Maththewkho,
>   > 
>   > Add the following to your exploration code (the P is a parameter which will let you define the length of the comparison period, delete this line and substitute 1 in the Addcolumn argument if you know that you will only want a one day delta) :
>   > 
>   > P = Param( "Periods", 1,1,50,1); 
>   > AddColumn( ( (C-Ref(C,-P))/Ref(C,-P))*100,"% Delta from "+WriteVal(-P,1) , 3.2, colorYellow,colorGreen);
>   > 
>   > Peace and Justice   ---   Patrick
>   >   ----- Original Message ----- 
>   >   From: matthewkho 
>   >   To: amibroker@xxxxxxxxxxxxxxx 
>   >   Sent: Wednesday, October 21, 2009 6:54 PM
>   >   Subject: [amibroker] intraday % change
>   > 
>   > 
>   >   for exploration, how would I get a stock's % change from previous day's close?
>   > 
>   > 
>   > 
>   >   ------------------------------------
>   > 
>   >   **** 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
>   >
> 
> 
> 
> 
>   ------------------------------------
> 
>   **** 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
>




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

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