Announcement

Collapse
No announcement yet.

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 CCLQMT, Today, 05:31 PM
        0 responses
        5 views
        0 likes
        Last Post CCLQMT
        by CCLQMT
         
        Started by yodaler, Today, 03:17 PM
        2 responses
        12 views
        0 likes
        Last Post yodaler
        by yodaler
         
        Started by tatir, Today, 03:09 PM
        2 responses
        18 views
        0 likes
        Last Post tatir
        by tatir
         
        Started by tffmd123, Today, 12:53 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by lunardiplomacy, Today, 12:42 PM
        1 response
        126 views
        0 likes
        Last Post NinjaTrader_ChristopherD  
        Working...
        X