Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EMA cross

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

    #31
    Mateo, if you'd like us to test a script, please include all necessary code. I see no mention of what Of_S or Of_L is.

    Just as koganam said, you will get different entries 99.9% of the time if switching from market to limit orders. This is to be expected.
    AustinNinjaTrader Customer Service

    Comment


      #32
      I can't paste the whole code becouse of character amount limit. Those two were inputs for offsetting entries (one for long one for short):
      #region Variables
      // Wizard generated variables
      privateint of_L = 0; // Default setting for Of_L
      privateint of_S = 0; // Default setting for Of_S
      // User defined variables (add any user defined variables below)
      #endregion

      Comment


        #33
        mateo, there is definitely a difference with using limit orders vs market orders. As I mentioned before, you are now submitting the orders to the close of the current bar (if the offsets = 0), which is not the same as the open of the next bar where the market order would be filled.
        AustinNinjaTrader Customer Service

        Comment


          #34
          So the only way to submit order at the next bar open is to use market replay ? I guess that's a lot of custom coding : ( Can you please show me a piece of code that's doing similar thing so I can use it as a reference ? Also, do you happen to know if I'd have the same proble trying to code it in TradeStation EasyLanguage ?? Thanks

          Comment


            #35
            Hello,

            You would use if (FirstTickOfBar)



            Unfortunately I do not know easy language.

            Let me know if I can be of further assistance.
            BrettNinjaTrader Product Management

            Comment


              #36
              Originally posted by mateo321 View Post
              So the only way to submit order at the next bar open is to use market replay ? I guess that's a lot of custom coding : ( Can you please show me a piece of code that's doing similar thing so I can use it as a reference ? Also, do you happen to know if I'd have the same proble trying to code it in TradeStation EasyLanguage ?? Thanks
              As stated earlier in the thread, I would say pretty much: "yes".

              You would use FirstTickOfBar, and CalculateOnBarClose = false together.

              CalculateOnBarClose = false will ensure that every tick is updated in real time, and at FirstTickOfBar, axiomatically, Close[0] = Open[0] = High[0] = Low[0].

              Comment


                #37
                Yea, but how do I apply my code to the data from market replay ?

                Comment


                  #38
                  Hello,

                  Run the market replay connection and get the live data playing back then use one of these techniques to run a strategy as if it was live. You would then have to play the time you wanted to test back like it was live. You can play it at up to 500x live speed to get faster results. This would be exactly like if you where running the strategy on live markets. Instead your doing it on the replay connection.



                  Let me know if I can be of further assistance.
                  BrettNinjaTrader Product Management

                  Comment


                    #39
                    Does wizard have capability of doing all those things or it will require custom coding ?

                    Comment


                      #40
                      Hello,

                      This would require custom programming and unlocking the code.

                      Let me know if I can be of further assistance.
                      BrettNinjaTrader Product Management

                      Comment


                        #41
                        what would be the cost of it for me ?

                        Comment


                          #42
                          mateo321,

                          NinjaTrader does not provide custom coding services but we have partners that do. They will charge based on the complexity of the project and typically provide estimates beforehand. You can see a list of our NinjaScript consultants here:
                          Ryan M.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                          0 responses
                          671 views
                          0 likes
                          Last Post Geovanny Suaza  
                          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                          0 responses
                          379 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by Mindset, 02-09-2026, 11:44 AM
                          0 responses
                          111 views
                          0 likes
                          Last Post Mindset
                          by Mindset
                           
                          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                          0 responses
                          575 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by RFrosty, 01-28-2026, 06:49 PM
                          0 responses
                          582 views
                          1 like
                          Last Post RFrosty
                          by RFrosty
                           
                          Working...
                          X