Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to edit NinjaScript without development tool?

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

    Is it possible to edit NinjaScript without development tool?

    I am running the free version of NT and do not have any development tools, visual studio etc. I would like to modify a script I found online (MACrossBuilder) but I cant figure out where the CalculateonBarClose it set so I make sure the code I add doesn't mess it up. The code works great now but I would like to modify it so on CalculateonBarCloase=False it only alerts once per bar. I found some good sample code on this site to try but I do not want to mess up the CalculateonBarClose=True which works fine. Any suggestions?
    Thanks,
    Scott

    #2
    Welcome to our forums Scott, you can set the CalculateOnBarClose as well from the UI as you add the indicator, it would be found in the parameters section of it.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      CalculateOnBarClose

      Bertrand,
      Thank you for the quick response. I do not understand what you mean by it can be added in the user Interface. CalculateOnBarClose does not show up in the code I found so I am not sure how it handles the code differently based on the setting for COBC.
      Scott

      Comment


        #4
        You're welcome Scott, COBC can be set in code but this is optional - it it's not set in code you can change this 'on the fly' from the indicator parameters window, see my screenshot please for a visual demonstration.

        This setting influences how the OnBarUpdate() is called for the script, it's either on the bar close (COBC = True) or on every tick seen (COBC = False).
        Attached Files
        BertrandNinjaTrader Customer Service

        Comment


          #5
          In the code I found COBC is set by the use in the indicator window within NT. How do I add the CalculateOnFirstTickOfBar and book flags so that COBC=true still works without considering the revised code?
          Scott

          Comment


            #6
            For with FirstTickOfBar, check into this reference sample we have - http://www.ninjatrader.com/support/f...ad.php?t=19387

            This technique will allow combining elements for COBC true and false in one script.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              That is the same code I wanted to try but I was confused because the code in MACrossBuilder does not call COBC directly so I can see it. I am not sure where to insert the sample code so I do not mess up the functionality. I can just start trying different things but I would rather understand what I am doing if possible.

              Comment


                #8
                We could unfortunately not create a step by step modification approach for the custom indicator you use, but if you're not very familiar with NinjaScript then I would suggest to first of a look at these tutorials to get you going towards code modification and creation :

                http://www.ninjatrader.com/support/h.../tutorials.htm
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Renejm, Today, 06:17 AM
                0 responses
                3 views
                0 likes
                Last Post Renejm
                by Renejm
                 
                Started by kazisl, Yesterday, 06:41 PM
                2 responses
                10 views
                0 likes
                Last Post NinjaTrader_PaulH  
                Started by impactX, 05-04-2021, 01:07 AM
                1 response
                7 views
                0 likes
                Last Post Lancer
                by Lancer
                 
                Started by op1031, Yesterday, 05:51 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_PaulH  
                Started by aaadetos, 05-04-2021, 09:28 AM
                2 responses
                13 views
                0 likes
                Last Post aaadetos  
                Working...
                X