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

Help converting Pivot TV indicator to NinjaTrader

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

    Help converting Pivot TV indicator to NinjaTrader

    need help converting the native pivot trading view indicator
    it is the same as the Swing and Fractal NT indicator

    the problem is that Trading View is reading Left to Right
    and NinjaTrader is reading from Right to Left

    this problem happens when we have equal hights or equal lows

    as you can see in the pictures
    the NinjaTrader Fractal is on the Left
    and the Trading View Pivot is on the Right

    what can I do in NinjaTrader?
    how can I make it read data left to right?
    any tips?
    Attached Files

    #2
    Hello AaronKoRn,

    Thanks for your post.

    What exactly are you referring to when you mention "the NinjaTrader Fractal is on the Left and the Trading View Pivot is on the Right"

    A NinjaTrader indicator will read data from the first bar on the chart (leftmost bar) to the last bar on the chart (rightmost bar / currently forming bar) for calculations. The values would then be accessed using a barsAgo parameter. 0 barsAgo refers to the currently forming bar on the chart. 1 barsAgo refers to 1 bar prior to the currently forming bar. 2 barsAgo refers to two bars prior to the current bar on the chart, and so on.

    I look forward to assisting further.​
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      I'm posting a picture,
      on the left, we have NT8, in the blue circle you can see the pivot on the left
      on the right we have TV, in the blue circle you can see the pivot on the right

      how can I make the NT8 indicator read data from the last bar to the first bar?
      Attached Files

      Comment


        #4
        Hello AaronKoRn,

        Thanks for that clarification.

        You could try creating a for loop that loops from the CurrentBar and counts backwards to the first bar (bar 0) to read data from the last bar to the first bar on the chart.

        CurrentBar: https://ninjatrader.com/support/help...sub=currentbar

        Note that it wouldn't be suggested to do that on every bar thought as it could cause the script to take more time to process.

        That said, I suggest you review how the existing indicators in NinjaTrader process forward one bar at a time as new bars build if you are trying to convert a script from a different platform to understand how NinjaScript are intended to calculate data.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 01:16 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by chbruno, 04-24-2024, 04:10 PM
        3 responses
        48 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by samish18, Today, 01:01 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by WHICKED, Today, 12:56 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by WHICKED, Today, 12:45 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X