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 chartchartchart, Today, 08:08 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Emily  
    Started by andreslazor7, Today, 08:08 AM
    2 responses
    12 views
    0 likes
    Last Post andreslazor7  
    Started by FatCanary, Today, 08:09 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by vantojo, 01-12-2021, 02:13 PM
    15 responses
    195 views
    0 likes
    Last Post FatCanary  
    Started by nailui, Today, 07:26 AM
    0 responses
    24 views
    0 likes
    Last Post nailui
    by nailui
     
    Working...
    X