protected override void Initialize()
{
SetStopLoss( CalculationMode.Percent, 0.08);
SetProfitTarget( CalculationMode.Percent, 0.03);
}
//Example code
protected override void OnBarUpdate()
{
if( RSI( slowSMA, 3)[0] > 30 && RSI( slowSMA,3)[0]<70)
{
if ( SMA(fastSMA)[0] > SMA(slowSMA)[0] )
{
EnterLong( 1);
}
if(SMA(fastSMA)[0] < SMA(slowSMA)[0] )
{
EnterShort( 1);
}
}
}

Comment