Hello,
In the code below see "marketup = MA(allords,15) > Ref(MA(allords,15),-10);"
I have added a paramtoggle in bold further down (under entrysetup) to turn the marketup code on and off. However, when it is enabled all the entry conditions are affected...i.e. toggled. I guess that is because of the AND statements between the entry conditions. Is this right? Is there a way to toggle one condition without affecting the others?
Thanks in advance...note: not all the code of the system is included...hope its enought o answer my question...cheers
Allords = Foreign( "$xao", "C" );
Marketup = MA(allords,15) > Ref(MA(allords,15),-10);
;
// Entry Filtering
ShortTermMATickUp = ShortTermMA > Ref(ShortTermMA, -1);
GreenCandleAboveSMA = GreenCandle AND C > ShortTermMA;
GreenCandleAllAboveSMA = GreenCandle AND C > ShortTermMA AND O > ShortTermMA;
EntryFilterMet = IIf(EntryFilter == 1, ShortTermMATickUp,
IIf(EntryFilter == 2, GreenCandleAboveSMA,
IIf(EntryFilter == 3, GreenCandleAllAboveSMA,
IIf(EntryFilter == 4, GreenCandle,
True))));
// Entry Criteria
EntrySetup = AboveMinTurnover
AND AboveAvgVolume
AND AboveMinPrice
AND LongTermUpTrend
AND PriceAboveLongTerm
AND c > Ref(MA(c,200), -1 * 100)
AND marketup= paramtoggle("marketup", "enable|disable",0)
;
EntryCondition = EntrySetup
AND RedCandle
AND CandleNotTooBig
AND BelowShortTermMA
AND RSIBelowEntryLevel
;
EntryPeriod = Flip(EntryCondition, ExRem(ExitTrigger, EntryCondition));