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

[amibroker] Re: Exploration Signal Value Compared to Current Value



PureBytes Links

Trading Reference Links

Thanks for that suggestion Steve. I was not familiar with the
'ValueWhen' function. Very handy tool. The code below worked with the
exception of this line:
AddColunn( Close, "Today", 1.2 );

It was given the close at the time the event took place. I replaced it
with this:
AddColumn( Close[ BarCount - 1 ], "Today", 1.2 );

And it gave me the close of the last bar, which in nearly all cases
will be current close (excepting delisted securities).

Thanks for clearing this up for me!

  Pete  :-)


--- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxx> wrote:
>
> Hi - If you are running it to see just today's results ( n=1 ), I
think your 
> Filter will only pass those tickers that had a cross today and so both 
> columns will probably show today's close...  You might try something
like 
> this ...
> 
> MACross = Cross(C, MA(C,10));
> CloseLastCross = ValueWhen( MACross , Close );
> Filter = 1;
> AddColunn( Close, "Today", 1.2 );
> AddColunn( CloseLastCross, "Last Cross", 1.2 );
> AddColunn( Close - CloseLastCross, "Change", 1.2 );
> 
> Steve
> 
> ----- Original Message ----- 
> From: "Pete" <dryheat3@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, August 05, 2008 11:39 PM
> Subject: [amibroker] Exploration Signal Value Compared to Current Value
> 
> 
> >I spent over an hour trying to figure this out and failed. It seems to
> > me the tools available in AFL should provide a solution but I could
> > not figure it out.
> > All I want is to create a column in my exploration that would compare
> > today's close to the close on the date the signal was created.
> > For instance:
> > Filter = Cross(C, MA(C,10));
> > AddColunn( <<Close at Cross>>);
> > AddColumn( <<Current Close>>);
> > //And more importantly;
> > AddColumn(<<[Close at Cross] - [Current Close]>>);
> >
> > I hope someone out there has a solution.
> > Thanks,
> >
> >  Pete  :-)
> >
> >
> > ------------------------------------
> >
> > 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/