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

Order price did not pass validation - error

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

    Order price did not pass validation - error

    Hi guys,

    I've been testing some automated strategies on an FXCM demo.

    for instruments AUS200 and JPN225 I continually get this error when it attempts to enter a position with a StopMarket order; 'Order price did not pass validation'.

    - What are the requirements for a price validation?

    Of note, I code very carefully. I'm rounding to tick size so that the price is legit, I'm also checking the current Bid/Ask as applicable and making sure I'm not attempting to place StopMarket orders inside the market (its always beyond a bar which has already closed and thus formed a high or low (as applicable) away from the market, plus I add a volatility buffer too...)

    Also of note, my strategy is working on four currencies, USOIL, XAUUSD, GER30 and SPX500... I find it odd that NT is only throwing this error for AUS200 and JPN225.

    Thanks in advance.

    #2
    Hello cjdsellers,

    Thank you for your post.

    Please send me your log and trace files for today so that I may look into what occurred. You can do this by going to the Control Center-> Help-> Mail to Platform Support. Please list 'ATTN: Patrick H - 1490937' in the subject line.

    Comment


      #3
      Hi Patrick,

      I may have saved you the trouble, I reviewed the log and traces myself and found the following at the rejection point;

      "2016-03-30 02:41:28:067 (FXCM D27441205001) Fxcm.Adapter.onRequestFailed: sRequestId='A10D1_2EFD732269EB3CA5E053D5293C0A336F _03282016073219728409_QRQA-64152' sError='Description=19915;DAS 19915: ZDas Exception
      ORA-20105: Order price did not pass validation.
      '
      2016-03-30 02:41:28:067 (FXCM D27441205001) Cbi.Account.OrderUpdateCallback: orderId='a75a51ef26244d45a6a1dfb1ad5d2233' account='05430482' name='NS_[S2]_Sell_U1' orderState=Rejected instrument='@AUS200' orderAction=SellShort limitPrice=0 stopPrice=5013 quantity=40 orderType='Stop Market' filled=0 averageFillPrice=0 error=OrderRejected comment=' Order price did not pass validation.'"

      of particular interest I actually found the FXCM API error code;

      "Error='Description=19915;DAS 19915: ZDas Exception
      ORA-20105: Order price did not pass validation."

      upon searching Google I found this write up about it;

      6. Why did I get the following error message: 19915: ZDas Exception ORA-20105: Order price did not pass validation 8=FIX.4.4|9=179|35=D|1=2620231783|11=FXSTAT_329514 21147085|15=EUR|38=5|40=3|54=2|55=ESP35|59=1|60=20 150113-11:04:45|99=9864|386=1|336=FXCM|625=EUREAL|516=0|5 26=OT_-2_1421147086_ESP35_ESP35_0__0_|10=080

      "Unordered List ItemThe rejected orders error message is generated when the stop price is within 12 points of ask price. The reason for rejected orders is because the Minimum Stop Distance for ESP35 is 12 points. For example, if the Ask price was 9911 and your Stop price 99=9917, you would receive this error message. In this example, the stop price should be at least 9911 + 12 = 9923."

      Which leaves me one question now, how can I determine the Minimum Stop Distance for an instrument?

      Also does NinjaTrader have an object I can call to determine this automatically?

      I've checked Instrument. and Instrument.MasterInstrument and can't see anything obvious there.

      cheers,
      Chris

      Comment


        #4
        Hello cjdsellers,

        Thank you for your response.

        There are no items we could pull to know the minimum distance or maximum distance needed. The strategy would need to figure this in it's calculation - meaning you would need to implement logic for this. You may need to create another strategy or use different parameters for different instruments.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bmartz, 03-12-2024, 06:12 AM
        5 responses
        32 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by Aviram Y, Today, 05:29 AM
        4 responses
        13 views
        0 likes
        Last Post Aviram Y  
        Started by algospoke, 04-17-2024, 06:40 PM
        3 responses
        28 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by gentlebenthebear, Today, 01:30 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by cls71, Today, 04:45 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X