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

RE: [amibroker] Controlling the Built-in Equity Plot



PureBytes Links

Trading Reference Links

nice approach H. Now figure out a way to get at max flat bars (from fred's
equity curve) output during an optimization run.
 
d


  _____  

From: Herman van den Bergen [mailto:psytek@xxxxxxxx] 
Sent: Saturday, October 02, 2004 5:26 PM
To: AmiBroker YahooGroups
Subject: [amibroker] Controlling the Built-in Equity Plot


These comment pertain to the "Equity Line" Built-in Indicator as used with
Individual Backtests. In addition to plotting from indicator formula windows
you can plot indicators directly from the AA (very useful for debugging) if
you insert /* below the

    //--equity-plot-- do not remove this line

line. Like so:

    //--equity-plot-- do not remove this line
    /*

this in effect comments out the Built-in Equity plot. Doing this you can add
Plot() statements to your system's code and plot these by clicking the
"Equity" button in the AA (a backtest is required after each code change).
To prevent having to insert/delete the /* each time you want to switch
between the Built-In Equity plot and your own plots you can curly-bracket
the Buit-in Equity code and make it conditional on the state of a
StaticVariable you can control from any AA code, the Built-In equity plot
now looks like ths:
/**/
//--equity-plot-- do not remove this line
if (IsEmpty(StaticVarGet("ShowBuiltinEquityPlot")))
StaticVarSet("ShowBuiltinEquityPlot",1);
if (StaticVarGet("ShowBuiltinEquityPlot"))
{
MaxGraph=0;GraphXSpace=5;
GraphZOrder=1;
Plot( Equity( 0, -2 ), "Equity", -8, styleArea );
// now buy and hold simulation
Short=Cover=0;
Buy=Status("firstbarintest");
Sell=Status("lastbarintest");
SetTradeDelays(0,0,0,0); PositionSize = -100;
ApplyStop(0,0,0,0);
ApplyStop(1,0,0,0);
ApplyStop(2,0,0,0);
Plot( Equity( 0, -2 ), "Buy&Hold", -9 );
}

Now you can control display of the Built-In Equity Plot directly from your
AA code, without the /* edit,  using this line:

StaticVarSet("ShowBuiltinEquityPlot",0); // Set argument 1 to plot Buil-In
Equity Plot

best regards,

herman.





[Non-text portions of this message have been removed]



Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 



Yahoo! Groups Sponsor	

ADVERTISEMENT
 
<http://us.ard.yahoo.com/SIG=129mstr2q/M=295196.4901138.6071305.3001176/D=gr
oups/S=1705632198:HM/EXP=1096838780/A=2128215/R=0/SIG=10se96mf6/*http://comp
anion.yahoo.com> click here	
 
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=
:HM/A=2128215/rand=436656637> 	


  _____  

Yahoo! Groups Links


*	To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
  

*	To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe> 
  

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




[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

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