Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error : Order price too far from market price with SP500

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

    Error : Order price too far from market price with SP500

    Hello Ninjatrader community,

    I developed an automated strategy, and it usually works very well.

    However, when I try to run my strategy on @SPX500, I always get the same errors : "Order price too far from market price (...)" AND "Order rejected (...)".

    Whats happens is that the strategy places an order, and reject it a few seconds later.

    If I run my strategy with any other pair (US30, GBPJPY, ...), it works well, I get no errors.

    I attached 2 images, one that shows the 2 pop-up errors, and one that shows my Log file.

    I don't know if this can help, but my code uses the OnBarUpdate() method, and my orders are sent using the EnterLong() method.

    Also, my data provider is FXCM.

    I noticed that the pip value of a certain period of SP500 in Ninjatrader is 50 pips, while the exact same period in FXCM shows 500 pips. Could this be part of the problem ?!

    Thank you very much, and happy holidays.

    Alex
    Last edited by alexismailhot; 12-27-2018, 03:01 PM.

    #2
    Hello alexismailhot,

    Thanks for your post.

    We can see the rejection is coming from a Sell limit order, and aligns with the submission of your Profit target order which was submitted to 10146.64. FXCM then rejected this order with the native error that it is too far away from the market.

    Before we get into pip sizes, could you share how you are using SetProfitTarget where it submits the sell limit order that far from the market price?

    I look forward to your reply.

    Comment


      #3
      Hello Jim,

      In fact this is my error, I had a conversion problem when using the StopLoss and ProfitTarget with SP500.

      Thank you very much, everything works fine now!

      Alex

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      64 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      139 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      75 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X