// Set 2
if ((Times[0][0].TimeOfDay > new TimeSpan(9, 35, 0))
&& (Times[0][0].TimeOfDay < new TimeSpan(15, 51, 0))
&& (Circuitbreaker == true)
&& ((FiveMinHigh - FiveMinLow) < 62.75)
&& (CrossAbove(High, LongBreak, 1)))
{
EnterLong(Convert.ToInt32(TradeSize), "");
TargetHigh = CurrentDayOHL1.CurrentHigh[0];
TargetLow = CurrentDayOHL1.CurrentLow[0];
}
// Set 3a Checks to see if open is greater than the long break and there is at least 50% of range points to gain. Exits at the TargetOpen
if ((Position.MarketPosition == MarketPosition.Long)
&& (OpenGreaterThanLongBreak == true))
{
ExitLongLimit(Convert.ToInt32(TradeSize), TargetOpen, "", "");
ExitLongStopMarket(Convert.ToInt32(TradeSize), LongStop, "", "");
}
// Set 3b
if ((Position.MarketPosition == MarketPosition.Long)
&& (OpenLessThanLongMin == true))
{
ExitLongLimit(Convert.ToInt32(TradeSize), TargetHigh, "", "");
ExitLongStopMarket(Convert.ToInt32(TradeSize), MidPoint, "", "");
}
// Set 3c
if ((Position.MarketPosition == MarketPosition.Long)
&& (OpenLessThanLongBreak == true))
{
ExitLongLimit(Convert.ToInt32(TradeSize), TargetHigh, "", "");
ExitLongStopMarket(Convert.ToInt32(TradeSize), MidPoint, "", "");
}
Comment