Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Arrows or dots on the chart

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Arrows or dots on the chart

    Hello!
    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

    #2
    Problem Solved!

    I had to declare them while filling in the data when generating the indicator. Was the firdt step.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    156 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    90 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    140 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    130 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X