I want to add use MFI filter as an option for this buy logic condition. How Do i implement it? Do i need another If statement or Switch statement? is there an example? Right now its complaining that method name is expected.Thank you
(MFI1[0] >= LevelForLongs)
Trade34BCCI = true;
LevelForLongs = 1;
LevelForShorts = 1;
MFIPeriod = 1;
MFI1 = MFI(Close, Convert.ToInt32(MFIPeriod));
else if (Trade34BCCI
&& (UseMFIFIlter == false)
&& emaAngulation > EMAAngulation * TickSize // EMA Angulation is greater then (x)
&& emaAngulationXBarsBefore > EMAAngulationXBarsBefore * TickSize // EMA Angulation X bars before - angulation not on current bar but 5 bars before for example
&& Close[1] < Open[1] // previous bar bearish
&& Low[0] < Low[1] // and low of signal bar is lower then previous bar
&& Low[0] < slowEMA[0] && Close[0] > slowEMA[0] + ABEMA34BCCI * TickSize
&& !(Open[1] < High[1] && Close[0] < High[1])
(UseMFIFIlter == true)
&& emaAngulation > EMAAngulation * TickSize // EMA Angulation is greater then (x)
&& emaAngulationXBarsBefore > EMAAngulationXBarsBefore * TickSize // EMA Angulation X bars before - angulation not on current bar but 5 bars before for example
&& Close[1] < Open[1] // previous bar bearish
&& Low[0] < Low[1] // and low of signal bar is lower then previous bar
&& Low[0] < slowEMA[0] && Close[0] > slowEMA[0] + ABEMA34BCCI * TickSize
&& !(Open[1] < High[1] && Close[0] < High[1])
&& (MFI1[0] >= LevelForLongs))
{
entryOrder = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Market, TradeSize, 0, 0, "", "34BCCI");
return;
}
Comment