Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 jaybedreamin, Today, 05:56 PM
    0 responses
    3 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    1 view
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    6 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Working...
    X