I know this is probably going to be something simple that I have missed, but I just wanted to test a simple strategy, it did 2 trades 3 years ago then never traded again. It is just simply selling yesterdays high at market and buying yesterdays low at market.
This is basically the code (not sure best way to share it on here?)
} else if (State == State.Configure) { SetStopLoss("", CalculationMode.Ticks, StopLoss, false); SetProfitTarget("", CalculationMode.Ticks, ProfitTarget); } } protected override void OnBarUpdate() { if (BarsInProgress != 0) return; if (CurrentBars[0] < 1) return; // Set 1 if (GetCurrentBid(0) == High[1]) { EnterShort(Convert.ToInt32(DefaultQuantity), ""); } // Set 2 if (GetCurrentAsk(0) == Low[1]) { EnterLong(Convert.ToInt32(DefaultQuantity), ""); } [LEFT][COLOR=#4D4D4D][FONT=Helvetica][/FONT][/COLOR][/LEFT]
Many thanks
Tom
Comment