Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 EnterShortStop Fails

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

    NT7 EnterShortStop Fails

    The following type of call consistently fails with Order Rejected: Order price too far from market price.

    EnterShortStop (0,true,1000,1.61828,"EURAUD_N33233962")

    TraceOrders produces the following:

    Code:
    Entered internal PlaceOrder() method at 28-Sep-18 00:12:33: BarsInProgress=0 Action=SellShort OrderType=Limit Quantity=1,000 LimitPrice=1.6182'8 StopPrice=0 SignalName='EURAUD_N33233962' FromEntrySignal=''
    Note that TraceOrders shows a LimitPrice has been INCORRECTLY set, rather than a StopPrice.

    A call such as this works:

    EnterShortLimit (0,true,1000,1.61948,"EURAUD_N72483291")

    TraceOrders produces the following:

    Code:
    Entered internal PlaceOrder() method at 28-Sep-18 00:12:33: BarsInProgress=0 Action=SellShort OrderType=Limit Quantity=1,000 LimitPrice=1.6194'8 StopPrice=0 SignalName='EURAUD_N72483291' FromEntrySignal=''
    Calls such as this work:

    EnterLongLimit (0,true,1000,1.61828,"EURAUD_N68177395")

    TraceOrders produces the following:

    Code:
    Entered internal PlaceOrder() method at 28-Sep-18 00:19:24: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=1,000 LimitPrice=1.6182'8 StopPrice=0 SignalName='EURAUD_N68177395' FromEntrySignal=''
    ... and crucially, calls to EnterLongStop work:

    EnterLongStop (0,true,1000,1.61948,"EURAUD_N28732522")

    TraceOrders produces the following:

    Code:
    Entered internal PlaceOrder() method at 28-Sep-18 00:19:24: BarsInProgress=0 Action=Buy OrderType=Stop Quantity=1,000 LimitPrice=0 StopPrice=1.6194'8 SignalName='EURAUD_N28732522' FromEntrySignal=''
    SUMMARY:
    • Calls to EnterLongLimit and EnterShortLimit both work and TraceOrders correctly shows a Limit Price
    • Calls to EnterLongStop work and TraceOrders correctly shows a Stop Price
    • Calls to EnterShortStop FAIL and TraceOrders shows that a LIMIT Price has INCORRECTLY been set rather than a Stop Price.

    The order management code for entering a ShortStop order appears to fail because it is using a zero Stop Price as a result of the LIMIT price being INCORRECTLY set instead of the STOP price.

    Please advise and fix.

    Thanks.
    Last edited by jeronymite; 09-27-2018, 08:56 AM.

    #2
    Hello jeronymite,

    Thanks for your post.

    I have taken a quick test on my end and I am not seeing the reported behavior. I did notice that the syntax for the EnterShortStop was missing a parameter. It may be that a previous instance of the code was running when you were preforming your test.

    I've included a demo of the test I have made so you can take the same steps on your end.

    Demo - https://drive.google.com/file/d/11Yu...w?usp=drivesdk

    Could you let us know if you are seeing an issue after taking the same steps in my video?

    I look forward to being of any further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      NT7 EnterShortStop Fails

      Many thanks, Jim. I really appreciate you looking into this and taking time to make that video. Thanks!

      The missing parameter was merely a transcription error that I corrected in a subsequent edit to the original post a few minutes after I posted it. My apologies for any confusion that may have caused.

      The behaviour I notice is that the order is submitted and I actually see it appear (briefly) on the chart if I have Chart Trader enabled. It appears and then disappears as it is rejected. At that point, a popup message about the order rejection appears.

      I'll send more details with trace files etc via email to you.

      Thanks again.

      Comment


        #4
        NT7 EnterShortStop Fails

        Well, it happens. It shouldn't, but it does. I discovered a coding error on my part that should have been obvious before I requested assistance here. Sigh.

        So, Jim, again I thank you for your very kind assistance, and I do sincerely apologise for having wasted your time. As always, I am most grateful for NT Support, even when I am the cause of the error.

        Thanks!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by terkk, Today, 01:16 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Heath  
        Started by TraderElegante, Today, 12:14 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by dgee949, Today, 11:44 AM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_JustinD  
        Started by NinjaTrader_Kate, Today, 12:01 PM
        0 responses
        16 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by efeuvejota01, Today, 11:42 AM
        2 responses
        28 views
        0 likes
        Last Post efeuvejota01  
        Working...
        X