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

Up Arrow Showing Up in Price Panel when DrawonPricePanel = false

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

    Up Arrow Showing Up in Price Panel when DrawonPricePanel = false

    I actually have two issues. I created an indicator nets bid and ask volume in a separate panel as bar charts and created a 'fast' and 'slow' EMA as line charts against those bar plots. Now I'm trying to try an Up Arrow when the 'fast' EMA crosses above the 'slow' EMA. However these arrows are currently getting plotted in the price panel even though I set DrawonPricePanel = false.

    The second issue is that the arrows don't seem to follow the logic of plotting when the 'fast' crosses above the 'slow' EMA. Pictures and code attached.

    Thanks!
    Attached Files

    #2
    Hello Jschmelz,
    You need to reset the template from bottom right in indicator settings or you can remove the old & add a new indicator, it should work as intended. Hope it helps!

    Comment


      #3
      Ah ha! Thanks s.kinra - resetting the template did seem to work. However one problem that's still arises is that the arrow plots even when the 'fast' EMA is still above the 'slow' EMA. My guess as to why this happens is that the code uses ticks and also uses the EMA so I'm picking up some intrabar swings that gets the arrow to plot. Not sure if there is a quick way to fix that but something to work out on my end.

      Comment


        #4
        Hello Jschmelz,
        You can use is first tick of bar condition for arrow, so it evaluates once per bar & rest code is unaffected.

        Comment


          #5
          S.kinra you are awesome - I'll give that a shot. Thanks!

          Comment


            #6
            Hello Jschmelz,

            s.kinra is giving good advice.

            If anything is changed in State.SetDefaults a new instance of the script will need to be added for the defaults to pulled. Defaults are only pulled when a new instance is added. Any template saved for the script would override any defaults that are pulled from State.SetDefaults.

            However, if you were to add the code to State.Configure, this would override any template, and would override any user selected setting as well.


            Also, below is a link to the help guide on IsFirstTickOfBar.

            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Perfect - thanks Chelsea!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by judysamnt7, 03-13-2023, 09:11 AM
              4 responses
              59 views
              0 likes
              Last Post DynamicTest  
              Started by ScottWalsh, Today, 06:52 PM
              4 responses
              36 views
              0 likes
              Last Post ScottWalsh  
              Started by olisav57, Today, 07:39 PM
              0 responses
              7 views
              0 likes
              Last Post olisav57  
              Started by trilliantrader, Today, 03:01 PM
              2 responses
              21 views
              0 likes
              Last Post helpwanted  
              Started by cre8able, Today, 07:24 PM
              0 responses
              10 views
              0 likes
              Last Post cre8able  
              Working...
              X