|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.