Is it possible to use marketable limit orders? I would like to buy/sell at market but only within a maximum amount range of pips. If the order tries to fill outside that range the order should be canceled.
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!
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
NinjaTrader
Marketable Limit order
Collapse
X
-
Hello siroki,
Thanks for posting today.
I believe what you are attempted can be done with a stop limit order.
If that is not the case, can you provide further clarification by what you mean by within a maximum range of pips.
Please let us know if we may be of further assistance for anything NinjaTrader.Alex G.NinjaTrader Customer Service
-
Well. I use the CalculateOnBarClose = true. Then I read the Close[0] price of the bar and hit a limit buy order for that Close[0] price.
My broker is FXCM. Problem occurs when the current ask price is below the Close[0] that i'm trying to get filled. FXCM rejects the order because the price I'm willing to pay is above the market price. The reason I want to do it this way is because I dont want to use market order because the spreads can be infavorable. But I also dont want to miss out on the entry, so I try to get filled at the Close[0] which at that time maybe be above market price.
I have also tried to do this with Interactive Brokers and they accept the order above market price, but just fill at current best price.
Comment
-
NT error
Hello,
Could you advise what does the following message mean. Is there problem with my script or it NT's problem. How can I fix it?
**NT** Error on calling 'OnMarketData' method for strategy 'RealV3/8bade28107bd44488626b345a10d62ad': This key does not exist in dictionary (Данный ключ отсутствует в словаре).
Comment
-
Originally posted by trader_85 View PostHello,
Could you advise what does the following message mean. Is there problem with my script or it NT's problem. How can I fix it?
**NT** Error on calling 'OnMarketData' method for strategy 'RealV3/8bade28107bd44488626b345a10d62ad': This key does not exist in dictionary (Данный ключ отсутствует в словаре).
Comment
-
Hello siroki,
Thanks for the reply.
If you are trying to place a buy limit above the current ask price your order will get rejected.
A solution would be to check the next open of the current bar and then decide if you want to place the order based on the price. You could check and see if the buy limit order would be allowed to be placed by knowing the current ask price.
However, you would need to change your CalculateOnBarClose = true so that you can calculate on updates and not only on the close of the bar.
The reason other brokerages would instantly fill is because the limit order would be filling at the current best price. The limit is the lowest you want to buy at. So if the price is below the limit it fill instantly because it will be buying at the best price which is better than your limit at the time. FXCM does not allow this and will reject that order versus filling you at the lower price.
Please let us know if we may be of further assistance for anything NinjaTrader.Alex G.NinjaTrader Customer Service
Comment
-
Hello trader_85,
Thanks for posting today and welcome to forum.
To further investigate 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.
I look forward to your reply and further assisting.Alex G.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
25 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
2 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
268 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
Comment