I created a strategy based on a custom indicator and when I run the "strategy analyser", it returns 0 trades... I think there is a problem in my strategy but I can't find what is wrong (I'm a beginner...).
My indicator is working properly, when I put it on a chart it returns me the right results (attached is a screenshot of my indicator). This indicator is not based on the instrument of the chart you put it on. It is an indicator that uses 2 additional dataseries and it is calculated only on these 2 additional dataseries (it does not use the dataseries of the chart, we can put it on any instrument chart it will display the same thing).
Then, in my strategy, depending on the value of this indicator, I have to enter long on one instrument and short on another instrument. So I added 2 dataseries to my strategy to ignore the main instrument (as for my indicator).
In "public class" of my strategy, I called my indicator:
{
Then in State.Configure, I added the dataseries:
AddDataSeries("MES 12-22", BarsArray[0].BarsPeriod);
Then in State.Dataloaded, I loaded my indicator:
indic = MyIndicator();
AddChartIndicator(indic);
And finally in OnBarUpdate(), I added conditions to enter on the 2 instruments:
protected override void OnBarUpdate()
{
if(indic[0] > 20)
{
With this, if my indicator exceeds 20, I am supposed to enter short on MNQ with quantity 2 and long on MES with quantity 3.
For position exits, I use this:
The goal is to close all positions if I have an unrealized profit of $25.
When I run the strategy in the strategy analyzer it returns me no trade... I don't understand where I made a mistake...
Thanks in advance

EDIT: I tried to run the strategy on playback account on there is no entry... And when i put the strategy on a graphic instrument, the indicator is not displayed (although i put "AddChartIndicator"). I think my strategy can't access the indicator but I don't know why...
