but here is what you can start off with. message me privatly if you have no idea how to amend this code for your liking...
#region random numbers if (Bars.IsFirstBarOfSession) { next = randNum.Next(0,2); time = randNum.Next(0,21); Print(next); } #endregion
next variable will be used for long/short
time variable will be used to enter long/short at random times
#region trade logic if (Position.MarketPosition == MarketPosition.Flat&&next == 0&&Times[0][0].TimeOfDay == new TimeSpan(time, 0, 0) ) { EnterLongLimit(1,true,Convert.ToInt32(fxToBuy), GetCurrentBid(0), "Target1"); } else if(Position.MarketPosition == MarketPosition.Flat&&next == 1 &&Times[0][0].TimeOfDay == new TimeSpan(time, 0, 0) ) { EnterShortLimit(1,true,Convert.ToInt32(fxToBuy), GetCurrentAsk(0), "Target1S"); } #endregion
Comment