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

Re: [amibroker] Help in solving



PureBytes Links

Trading Reference Links

You need to add a condition to only provide results if the last bar
has date and time equalling the current date and time, to within the
relevant interval. In the afl functions there is Now function. use
this as means to create the required condition

-- 
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com



2009/9/30 Vinay Gakkhar. <vgakkhar@xxxxxxxxxxx>:
> Using the following exploration, when I run Automatic Analysis with intraday data updation every 1 minute and after selecting Range = n last quotation and n = 1 and Periodicity = 1Minute and Run every = 1minute, it gives me results using "last bar", but I want that I should get results using "last minute's bar". So if there was no bar during last 1 minute, I should not get any result.
>
> Kindly help me in making the necessary modifications.
>
> Thanks, best regards,
>
> Vinay Gakkhar
>
> _SECTION_BEGIN("vg");
> SetChartOptions(0,chartShowArrows|chartShowDates);
> _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
> Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
> if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
> {
>      ToolTip=StrFormat("Open: %g\nHigh:  %g\nLow:   %g\nClose:  %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
> }
> VolumeFilter = (MA(V, 30)) >= 100000 ;
> CM2 = (Ref(C,-2)) ;
> CPct0 = (C-CM2)*100/CM2;
> CPts0 = C-CM2;
> Buy = VolumeFilter AND CPct0 > 0.5 AND CPct0 <= 1 AND CPts0 > 0.5 AND CPts0 <= 1 ;
> Sell = VolumeFilter AND CPct0 < -0.5 AND CPct0 >= -1 AND CPts0 < -0.5 AND CPts0 >= -1 ;
> AddColumn(IIf(Buy,66,83),"B/S",formatChar, IIf( Buy,colorGreen, colorRed ) ) ;
> AddColumn (CPct0,"CPct0",1.1,IIf(CPct0 >= 0,colorGreen,colorRed));
> AddColumn (CPts0,"CPts0",1.1,IIf(CPts0 >= 0,colorGreen,colorRed));
> AddColumn ( CM2 , "CM2", 1.0 ) ;
> AddColumn (C,"C",1.0,IIf(C >= CM2,colorGreen,colorRed));
> Filter = Buy OR Sell ;
> PlotShapes( IIf( Buy , shapeUpArrow, shapeNone ) , colorGreen );
> PlotShapes( IIf( Sell , shapeDownArrow, shapeNone ) , colorRed );
> AlertIf( Buy , "EMAIL", "Buy alert on " + Name() + "(" + FullName() + ")" + " "  + "at"  + " " + LastValue(Close) + " " + "on" + " " + Date() ) ;
> AlertIf( Buy , "SOUND C:\\Windows\\Media\\Chord.wav", "Audio alert", 2 );
> AlertIf( Sell , "EMAIL", "Sell alert on " + Name() + "(" + FullName() + ")" + " " + "at"  + " " + LastValue(Close) + " " + "on" + " " + Date() ) ;
> AlertIf( Sell , "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2 );
> _SECTION_END();
>
>
>
> ------------------------------------
>
> **** 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/