The idea is the indicator will be called by the strategy and each case will be 1 to say 40 and then will be one of the parameters that change by one (integer) as the strategy is optimised (leaving aside each strategy will also have other parameters).
Currently the code with which I have tried to call the indicator ShortCandleBase (candle database), but is not working, is:
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if (CurrentBars[0] < 1)
return;
if (Position.MarketPosition == MarketPosition.Flat
&& ShortCandleBase (1).PatternFound[0] == 1)
{
EnterLong(1, "");
}
}
This would then need to be changed to have an input parameter for the ShortCandleBase reference, which is currently 1 (could have been the other pattern or 2 and eventually contain many patterns.
Many thanks for any help anyone can give
Comment