NinjaTrader allows me to code a strategy by simply referencing an indicator inside the strategy, i.e. the plot values of the indicator can be used inside the strategy as variables, and if I want the strategy to also plot the indicator without explicitly adding the indicator itself, I just add the indicator within the strategy code. This will prevent the potential mistake of supplying different params to the indicator and the strategy, were they added to chart separately.
In MultiCharts EasyLanguage, it seems that I cannot do something similar?
What I have learnt so far, is, write a function that generates the values, then write an indicator to plot the values, then write a signal that uses the values of the function.
However, if there is an existing indicator that plots, can I use the plot values in a MultiCharts strategy like in Ninja?
I am just worried that there is always the danger of mistakenly supplying different params to the function, from within the indicator and from within the strategy, since they need to be added separately.
With either of the two approaches you won't have these problem. If the trendlines are being plotted from the strategy there is no indicator with different settings.
In the latter approach the indicator would read the values from the strategy and doesn't have any inputs at all.
By the way it just came to my mind instead of feeding the indicator the strategy values via EL Collections, simply feed the inputs only.
This will make sure the results are similar (make sure the maximum number of bars the studies reference are the same!) as the inputs are alike.