I would like to be able to choose which indicators/logic my cBot uses to trade, similar to the Clickalgo Switchback cBot.
Presently I have 4 different indicators, and not all of them should be active for all instruments (maybe) but I am not sure which, and I am also not sure if this assumption is correct so I want to be able to test it without having to write 24 robots, or logic lines to test all the combinations.
I thus need to be able to selectively enable or disable each indicator, eg.:
[Parameter("Bollinger bands", Group = "Logic selector", DefaultValue = true)]
public bool useBollinger { get; set; }
The problem that I am presently stuck on is how do I selectively use each indicator in the order execution:
ExecuteMarketOrder(TradeType.Sell, SymbolName, volumeInUnitsshort, robLabel, stopLoss, takeProfit);
At the moment I stack the position open logic in a single line, for example:
if ((Positions.Count < maxOpenshort) & (Bid > prcSelluppershort) & (cCyclecycleshort < 0) & (cCycletriggershort < 0) & (tsMaresultshort < Bid))
However I cannot use this way in an elegant way (ie. not write each combination out manually), I would need to hard code the 24 combinations.
Thus please let me know how, or even if I should try to find a more elegant solution for using multiple selectable indicators for position management.
V.