• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 jjnc2006, Today, 07:36 PM
        0 responses
        3 views
        0 likes
        Last Post jjnc2006  
        Started by futurenick, Today, 06:26 AM
        1 response
        11 views
        0 likes
        Last Post nkhoi
        by nkhoi
         
        Started by NinjaCustomer, Today, 12:29 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by Steve L, Today, 11:32 AM
        0 responses
        7 views
        0 likes
        Last Post Steve L
        by Steve L
         
        Started by prabbala, Today, 10:41 AM
        0 responses
        4 views
        0 likes
        Last Post prabbala  
        Working...
        X