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

[amibroker] Re: Is there a faster way of writing this AFL?


  • Date: Sat, 05 Dec 2009 10:11:30 -0000
  • From: "Bisto" <bistoman73@xxxxxxxxx>
  • Subject: [amibroker] Re: Is there a faster way of writing this AFL?

PureBytes Links

Trading Reference Links

sometimes I use this but I never check if it's really useful

I mean: if I put inside the {} only plot or plotshape or title calls like


if ( Status( "action" ) == 1 )
{
    _N( Title = StrFormat( "{{NAME}} - " + FullName() + " -{{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", colorBlack, styleNoTitle |
          LastValue( IIf( LastValue( L ) == LastValue( H ) AND LastValue( C ) == LastValue( O ), styleDots, styleCandle ) )/*GetPriceStyle()*/ );

    Plot ( MA( C, Veloce ) , "Veloce", colorRed, styleLine );

    Plot ( MA( C, Lenta ), "Lenta", colorBlack, styleDashed | styleLine );

}

I really speed up the backtest or AB, during a backtest, already ignores Plot and similar calls?

did you do a test?

Tomasz, are you reading?

it's sure that putting inside {} all the calculations needed for plot is useful, mu doubt if it is useful to do it also with functions that are used only for plotting pourposes

thanks

Bisto


--- In amibroker@xxxxxxxxxxxxxxx, "j0etr4der" <j0etr4der@xxx> wrote:
>
> If you mean backtest or optimization speed then this could help...
> 
> if ( Status( "action" ) == actionIndicator )   
> {    
> Plot(Foreign("ZZZZ", "Close")/Foreign(XYZ", "Close"), "ZZZZ/ZYX Ratio", colorGreen);
> //all of your plots, plotshapes and calculations specific to plotting...
> .
> .
> .
> }
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "potatosoupz" <potatosoupz@> wrote:
> >
> > Plot(Foreign("ZZZZ", "Close")/Foreign(XYZ", "Close"), "ZZZZ/ZYX Ratio", colorGreen); 
> > 
> > I have a few of these and they seem to be slowing down the whole app. Is that possible?
> >
>




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

**** 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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/