Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Horizontal Divergence line

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

    #16
    Hello Bill,

    The NinjaScript Editor 401 video is linked in the forum post I linked up in post #4. This is the link to the helpful information about getting started with NinjaScript.

    Also, below is a link to the Platform > Pricing page on the NinjaTrader website.
    Get started with our free plan to trade with discounted commissions or choose a plan upgrade to further reduce commissions on your trades.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Chelsea,

      I'm following along w/ the video you made NinjaScript Editor 401 I do get it to compile and then I want to copy the script over, I right click inside the view code in the ninjascript editor I try to click 'save as' but it's not highlighted?
      Attached Files

      Comment


        #18
        Hello Bill,

        Is the script unlocked?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          I'm not positive but later as I tried again to create a indicator thru the strategy process copy/past etc. I was able to 'save as' with as far as that goes but still couldn't complete the process of seeing a finish product. I just want to make a simple crossover indicator of some kind so I can see it.

          I'm using a Sim key not my live key because I'm currently using the free version. Once I do make a some kind of indicator would I be able to still use it over in the live key free version ninja? I know u cant use strategies but isn't it just like downloading a free indicator from the User App Share?

          Thanks..

          Comment


            #20
            Hello Bill,

            Is the strategy listed in the drop-down on the Welcome page of the Strategy Builder?

            Yes, NinjaScript Strategies can be created when using the Simulation License Key.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #21
              Yes it is.

              Once I do make a indicator will I be able to use it in the 'Live Account ' version the free version? after I log out of 'Sim License Key' back into my live account.

              Comment


                #22
                Hello Bill,

                Unfortunately, the NinjaScript Editor 401 video was put up shortly after NinjaTrader 8 came out of beta when it was necessary to copy a script from the editor. The UI has changed and now requires you to copy a locked script from the drop-down on the Welcome page of the Strategy Builder.



                If the strategy is listed in the Strategy Builder drop-down on the Welcome page then the script is still locked for editing in the Strategy Builder and has not been unlocked.

                Unlocked scripts are copied in the NinjaScript Editor.

                Indicators can be used with all license keys including the Simulation Only license, the Free Live license, the Single Broker license, and the Multi-Broker license.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #23
                  That does explain why then thank you for that new video Chelsea. Wow we can actually copy an existing indicator to make modifications in it! That is awesome.
                  Let me try again now and I'll take screenshots along the way incase it fails somewhere and u can see what I'm doing or not doing.

                  The other problem was I was also following a recording from 2016 and there was obvious differences in the ninja8's between mine & his I was surmising for the slight differences.

                  Comment


                    #24
                    My goodness no issues! I didn't make a new indicator yet but like u did in your above video I selected a indicator for modification. The MacDBBLines but I want to make it draw lines at every divergence pivot on my chart. Like the 2nd pic (I didn't draw all of them)

                    Where would I add the language please? (Now I'm making some progress) Thank you sooo much!
                    Attached Files

                    Comment


                      #25
                      I saved it as MacDBBCuston1 this time now I can make changes to that one.
                      Attached Files

                      Comment


                        #26
                        Hello Bill,

                        If you want to add custom logic to a script, this would likely be in the OnBarUpdate method.

                        This should go in under any checks for current bars or bars in progress.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #27
                          Can you give me a demonstration on how to do add a OnBarUpdate in the proper place like the current bars or bars in progress? I experimented but I know it's not correct. How would I write it?
                          Attached Files

                          Comment


                            #28
                            Hello trdninstyle,

                            I cannot write custom logic for you.

                            However, as an example of drawing a line from 5 bars ago at the high of 5 bars ago to the current bar:

                            Code:
                            protected override void OnBarUpdate()
                            {
                            
                            if (CurrentBar < 5)
                            return;
                            
                            if (/* conditions to draw line, here*/)
                            {
                            Draw.Line(this, "myLine" + CurrentBar, 5, High[5], 0, High[5], Brushes.Blue);
                            }
                            
                            }

                            Try using the strategy builder to draw a line between to two points and then take a look at the code that it generates.

                            As a heads up, in your screenshot there needs to be a variable that is being assigned that value on line 132.
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #29
                              Okay, that looks pretty good I appreciate your help I will have to apologize in advance for picking your brain my friend in the days and weeks to come. I'm working on a Trigger Line Cross that colors the background at the cross up or down thru the strategy. There's this video from 20016 that showed each step but I think now I can pick back up on it just from what u showed me today.

                              Every time I make a new indicator in the strategy builder do I copy the script that's in the strategy builder then unlock the copied one for editing it?

                              I did copy a SMA changed the period from 14 to 55 named it SMA1 and it worked. I just wanted to do a simple copy and see it work. Thanks again. I'll do as you suggested too.

                              Comment


                                #30
                                Hello Bill,

                                As long as you would like to continue using the Strategy Builder to generate code, I would recommend making a copy of the script that is then unlocked while the original remains locked in the Strategy Builder.
                                Chelsea B.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by rhyminkevin, Today, 04:58 PM
                                3 responses
                                47 views
                                0 likes
                                Last Post Anfedport  
                                Started by iceman2018, Today, 05:07 PM
                                0 responses
                                5 views
                                0 likes
                                Last Post iceman2018  
                                Started by lightsun47, Today, 03:51 PM
                                0 responses
                                7 views
                                0 likes
                                Last Post lightsun47  
                                Started by 00nevest, Today, 02:27 PM
                                1 response
                                14 views
                                0 likes
                                Last Post 00nevest  
                                Started by futtrader, 04-21-2024, 01:50 AM
                                4 responses
                                50 views
                                0 likes
                                Last Post futtrader  
                                Working...
                                X