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

limit price (bid ask) in a strategy

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

    limit price (bid ask) in a strategy

    Hallo, I have build a strategy with NT Wizard and I prefer insert a limit order for long entry with "getcurrentbid(0)" and not a "market order" (I trade emini midcap and spread, sometime, is too big). For close a long position I had use "exit long position" and for a short position I had use "Enter short position by a limit order" and in limit price "Get Current Ask()". Strategy made correctly a long order but not filled a short order. How is the problem?
    Thank you

    #2
    Hello DenisF,

    Thanks for your inquiry.

    To troubleshoot the strategy and understand why an order submission did not occur, debugging steps will have to be taken.

    I would suggest to print the price that you are submitting the order at along side your order methods, and then to print the variables used for your entry/exit conditions in the actions field of an empty condition set.

    I have created a video describing how you can add prints to a strategy in the Strategy Builder to debug the NinjaScript code.

    Demo: https://www.screencast.com/t/8uvjfM8h

    Additional publicly available tips on debugging can be found below:

    Debugging: http://ninjatrader.com/support/forum...ead.php?t=3418

    TraceOrders: http://ninjatrader.com/support/forum...ead.php?t=3627

    Please let me know if I may be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thank you Jim. In NT Wizard I can see "reverse order" (i can use it without "exit long" and entry short at market"). How can I insert a commnad "reverse order" in code of strategy create with wizard?
      Thanks

      Comment


        #4
        Hello DenisF,

        I am not aware of a "Reverse Order" method available in the Strategy Builder or the Strategy Wizard. If you would like to reverse your position, you will need to submit an entry order in the opposite direction of the position that you are in without calling an exit method.

        For example, calling EnterLong() when you are in a short position or calling EnterShort() while in a long position. The SampleMACrossover strategy can be used as an example.

        If the information above does not resolve your inquiry, could you provide a screenshot to clarify the matter for me?
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by funk10101, Yesterday, 09:43 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by TheWhiteDragon, 01-21-2019, 12:44 PM
        5 responses
        551 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by rtwave, 04-12-2024, 09:30 AM
        5 responses
        37 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by funk10101, Today, 12:02 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by GLFX005, Today, 03:23 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Erick  
        Working...
        X