Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can I program custom indicators based on conditional statements into Ninja Trader?

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

    Can I program custom indicators based on conditional statements into Ninja Trader?

    I am currently on a free trial of Ninja w/CQG data feed. Is it possible to do the following:


    1) Program a custom indicator that is similar to this: If the high of bar one is greater than the high of bar 2 and the close of bar 2 is greater than the mid of bar one.

    ( H[-1]>H[-2] AND C[-2]>MID[-1])

    2) Enable a triangle to show up above the price bar on a sell and below on a buy to signal buying or selling pressure.....and have the triangle updating on a tick by tick basis as the condition is met and true or null and false......essentially the triangle would be flashing on and off as the tick data is updating live and effecting the relevance of the triangle.

    #2
    Welcome to our forums here - yes this would be possible both to custom code in NinjaTrader's NinjaScript - http://www.ninjatrader.com/support/h.../tutorials.htm

    If you're not a programmer, a range of consultants is available to professionally create this code for you -

    Comment


      #3
      sample language

      I think if I had a sample then I could program my inicators in accordingly.

      could anyone translate the following indicator into ninja script, where I would type it into the template........

      if (current bar low <= low of 3 bars ago) and (close of current bar > close of 3 bars ago) then a purple triangle would show up at the bottom of the bar


      in other platforms I have inputted something like this: if(L<=L[-3]) and [C>C[-3])

      Basically, I am not versed in C# computer language. I am struggling with how to input statements containing "AND", IF, HIGH, LOW, OPEN, CLOSE.

      I have been through the tutorials and can set up the indicator....just need help with the script end of things.

      Thank you in advance

      Comment


        #4
        vern13, you could for example give this snippet a try in your custom indicator -

        if (CurrentBar < 3) return;

        if ((Low[0] <= Low[3]) && (Close[0] > Close[3]))
        DrawDot("tag1" + CurrentBar, true, 0, Low[0] - TickSize, Color.Blue);

        Good luck!

        Comment


          #5
          Thank you, I will give it a shot!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          574 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          332 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X