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

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 :

                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by algospoke, Today, 06:40 PM
                0 responses
                10 views
                0 likes
                Last Post algospoke  
                Started by maybeimnotrader, Today, 05:46 PM
                0 responses
                7 views
                0 likes
                Last Post maybeimnotrader  
                Started by quantismo, Today, 05:13 PM
                0 responses
                7 views
                0 likes
                Last Post quantismo  
                Started by AttiM, 02-14-2024, 05:20 PM
                8 responses
                168 views
                0 likes
                Last Post jeronymite  
                Started by cre8able, Today, 04:22 PM
                0 responses
                10 views
                0 likes
                Last Post cre8able  
                Working...
                X