PureBytes Links
Trading Reference Links
|
SetCustomBacktestProc( "" );
if ( Status( "action" ) == actionPortfolio )
{
bo = GetBacktesterObject();
bo.PreProcess();
for
( bar = 0;
bar < BarCount; bar++ )
{
for ( sig = bo.GetFirstSignal( bar ); sig; sig =
bo.GetNextSignal( bar ) )
{
SetForeign( sig.Symbol );
array = RSI( 14 );
RSI_Trigger = array[bar] > 20;
array = V;
V_Trigger = array[bar] > 200000;
RestorePriceArrays();
}
bo.ProcessTradeSignals( bar );
}
for
( trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() )
{
trade.addcustommetric( "RSI_Triger", RSI_Trigger );
trade.addcustommetric( "V_Trigger", V_Trigger );
}
bo.PostProcess();
}
Radek Simcik wrote:
Hi,
I do know how to add calculated custom metrics to the backtest result
but I did not get how to add column like I do in the exploration mode
AddColumn( RSI(14), "RSI", 1.0, colorDefault, colorDefault,50); or
better a value from my own variable.
AddColumn( RSI(14)>20, "RSI trigger", 1.0, colorDefault, colorDefault,50);
AddColumn( V>200000, "V trigger", 1.0, colorDefault, colorDefault,50);
Why I need it? Let's say I am using more than one trigger and I want
to know which one worked...
I went through http://www.amibroker.com/guide/a_custommetrics.html but
didn't find an answer.
Any help is appreciated.
Thank you,
Radek
------------------------------------
**** 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/
__._,_.___
**** 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/
__,_._,___
|
|