I am struggling to get my arrows on the appropriate bars on my chart. I have created two arrays, one for each direction. private double[] Buys; and private double[] Sells; directly placed after: public class myIndicator : Indicator.
{
In protected override void OnBarUpdate()
{
After add my custom indicator logic, I collect the arrows respectively in Buys[0] and Sells[0]. The compilation does not indicate any error. The problem is that I do not have any arrow on the chart. But when I replace Buys[0] and Sells[0] by Value[0]and Value[0], the arrows appear on the chart. I am really not convinced using Value[0] twice once for Buys[0] ad once for Sells[0].
Question: Why are my Buys[0] ad Sells[0] failing to plot the arrows on the chart? I am suspecting Value[0] to be a propriety of Ninjatrader and that it is the reason it is plotting arrows. Right?
In my research I found for the Aroon Ninjatrader indicator that they are using Up[0] and Down[0] (lines 73 and 74, 119 and 120). I tried to find in the script where they were declared and I did not find. I tested Up[0] and Down[0] in my script too (without conviction because I did not declare them myself), but the compilation pupped up the error message.
Questions: 1) What could be the secret having its own arrays plotting the arrows on the chart?
2) Why are my arrays are failing?
Best regards
Comment