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

Re: [amibroker] How to code this strategy ?


  • Date: Thu, 10 Dec 2009 17:45:10 +0100
  • From: Aron <aron.groups@xxxxxxxxx>
  • Subject: Re: [amibroker] How to code this strategy ?

PureBytes Links

Trading Reference Links



SetBarsRequired(sbrAll, sbrAll);
Buy[0] = 1;
Sell= 0;
Short = 0;
Cover = 0;
Cnt =
0;
for ( i = 1; i < BarCount; i ++)
{
   Cnt++;
   
if ( Cnt == 8)
   
Sell[i] = 1;
   
   
if( Cnt == 13)
   
Short[i] = 1;

   
if ( Cnt == 19)
   
Cover[i] = 1;

   
if (Cnt == 27){
   Cnt =
0;
   
Buy[i] = 1;}

   
}

Plot ( C, "", colorWhite, styleBar );
PlotShapes( Buy*shapeSmallUpTriangle, colorGreen, 0, L,0 );
PlotShapes( Sell*shapeSmallCircle, colorGreen, 0, H,0 );
PlotShapes( Short*shapeSmallDownTriangle, colorRed, 0, H,0 );
PlotShapes( Cover*shapeSmallCircle, colorRed, 0, L,0 );





On 12/10/2009 4:25 PM, pierre8rou wrote:
Strategy to backtest 

Be 8 days long. 
Then 5 days cash. 
Then 6 days short. 
Then 8 days cash. 
  



__._,_.___


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





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___