Examples

privatedoublestopPrice=0;protectedoverridevoidOnBarUpdate(){if(CurrentBar<20)return;// Only enter if at least 10 bars has passed since our last entryif((BarsSinceEntryExecution()>10||BarsSinceEntryExecution()==-1)&&CrossAbove(SMA(10),SMA(20),1)){EnterLong("SMA Cross Entry");stopPrice=Low[0];}// Exits positionExitLongStopLimit(stopPrice-(10*TickSize),stopPrice);}