Hi Aron, thanks for uploading the code for public access. I'd like to do something similar to the OP, but somehow I can't get it to backtest on equities.
I made a few very basic changes, but I'm not skilled in coding. I wonder if you could suggest what I need to change please?
OptimizerSetEngine("cmae");
Sell = short = Cover = pos = 0;
Buy = 1;
TickSize = Optimize("1",1,1,100,1);
increment = Optimize("2",.01,.01,.99,.01) * TickSize ;
orders = 5;
PositionSize = 10000;
Sell = C>0;
for( i = 0 ; i < BarCount ; i ++ )
{
if( pos )
{
count = 0;
for( n = 1 ; n <= orders ; n ++ )
{
if( order[n] )
{
if( High [i] > order [n] )
{
Buy [i] = sigScaleIn;
count ++;
order[n] = 0; // executed
}
}
}
PositionSize [i] = count * 10000;
}
else
{
if( Buy [i] )
{
order = Null ;
for( n = 1 ; n <= orders ; n ++ )
{
order [n] = Close [i] + n * increment;
}
pos = True;
}
}
}
Posted by: cam_111000@yahoo.com.au
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (0) |
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/
EmoticonEmoticon