Convert Limit to Market Order - NinjaTrader | futures io social day trading
futures io futures trading


Convert Limit to Market Order
Updated: Views / Replies:1,370 / 3
Created: by GSREDDY Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Convert Limit to Market Order

  #1 (permalink)
Elite Member
sanfrancisco
 
Futures Experience: Advanced
Platform: Ninjatrader,TS,IRT
Broker/Data: IQfeed
Favorite Futures: ES
 
Posts: 45 since Feb 2012
Thanks: 26 given, 21 received

Convert Limit to Market Order

Hi,
I am using Limit OR market orders for entry and have used SetStopLoss and SetProfitTarget for exits.
If I understand correctly, SetProfitTarget is a limit order.
When the price is trading on my target for exit, based on few conditions I would like to convert limit order to market order.
Do I need to change the order using SetProfitTarget (CalculationMode.Price, GetCurrentBid() + TickSize) to cover long position and SetProfitTarget (CalculationMode.Price, GetCurrentAsk() - TickSize) to cover Short position?
I like to use OCO orders as my target and exits are predefined based on entry.
Thanks,
GSREDDY.

Reply With Quote
 
  #2 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received

Answer
This post has been selected as an answer to the original posters question Answer


GSREDDY View Post
Hi,
I am using Limit OR market orders for entry and have used SetStopLoss and SetProfitTarget for exits.
If I understand correctly, SetProfitTarget is a limit order.
When the price is trading on my target for exit, based on few conditions I would like to convert limit order to market order.
Do I need to change the order using SetProfitTarget (CalculationMode.Price, GetCurrentBid() + TickSize) to cover long position and SetProfitTarget (CalculationMode.Price, GetCurrentAsk() - TickSize) to cover Short position?
I like to use OCO orders as my target and exits are predefined based on entry.
Thanks,
GSREDDY.

Great question, I could never figure out how to "unset" a PT with NT7. I would away move it way out of range so I didn't end up with an overfill if I threw a Market Order to exit.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Reply With Quote
 
  #3 (permalink)
Elite Member
sanfrancisco
 
Futures Experience: Advanced
Platform: Ninjatrader,TS,IRT
Broker/Data: IQfeed
Favorite Futures: ES
 
Posts: 45 since Feb 2012
Thanks: 26 given, 21 received


Hi
Thanks for the reply and great work on LOM.
I am using SetProfitTarget to exit and trying to modify the same order to get it filled(modifying it to below or above current bid or ask price). Not issuing any new Exit orders to exit.
if we modify the SetProfitTarget values, it should update/modify the existing order in the market if it is not yet filled. If the order get filled before it gets updated with new price, my OCO order will get cancelled because of filled leg and the reference to change of price will be lost.
Can you please provide me the case where we get over fill with OCO (Market entry, exits with SetProfitTarget and SetStopLoss?
Can you please point me to any document or any thread related to more information on over filling related SetProfitTarget?
Thanks,
GSREDDY.

Reply With Quote
 
  #4 (permalink)
Elite Member
sanfrancisco
 
Futures Experience: Advanced
Platform: Ninjatrader,TS,IRT
Broker/Data: IQfeed
Favorite Futures: ES
 
Posts: 45 since Feb 2012
Thanks: 26 given, 21 received

hi,
Thanks for the help and suggestions. If I make the below changes to the existing OCO order resting in the exchange should not over fill theoretically. I haven’t coded for this yet, I am still in the design and learning phase. If anyone has used this method for filling please through some light on any issues faced.
I have also discussed this in ninja form.
OCO to Market Order - NinjaTrader Support Forum
sequence of steps.
1. Use the SET methods to set profit target and stop loss
2. Enter the position in OnMarketData based on the flags set in on bar update
3. Once the position is filled exchange will have working initial profit target and stop orders
4. Based on few conditions verified in OnBarUpdate, need to set the flags to move profit target or close the position at market
5. Case1: once the conditions are met to increase PT without closing position
• In OnExecution check for any fill or partial fill @ initial PT
• If there is no fill call the setptofittraget with new price. This will change the PT to new price
• If the position gets filled before updating the price in exchange, order(new change) will get rejected
Case2: conditions are met to close the existing position @ market
• In OnExecution check for any fill or partial fill @ initial PT and collet order status and PT price into variables
• If the order is not completely filled use the set profit target method to move the PT way far from market (may be 20 ticks)
• In OnOrderUpdate check for change in the order status and price comparing the data collected in the above steps and issue the market order to close the position.
6. If the position is flat and there is no working orders in the exchange, rest the initial profit and stop loss to initial values
As per the information got from ninjaform, we don’t need to cancel the pending PT and stop loss orders in the exchange. Ninja should cancel these orders once the position goes to flat.
Can you please point me if I am missing anything in this design that needs to be taken care?
Are there any drawdowns in this approach? I really need second look in this design since this is the first time I am trying to do something in this area of scripting.
Thanks
gsreddy

Reply With Quote

Reply



futures io > > > > Convert Limit to Market Order

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
program a limit order in a strategy bob998 NinjaTrader Programming 18 April 24th, 2012 02:37 PM
Direction dependent Limit Order Ducman Elite Automated NinjaTrader Trading 24 September 19th, 2011 05:45 PM
STUCK LIMIT ORDER ShruggedAtlas NinjaTrader 3 September 8th, 2011 10:29 PM
Stop Limit Order Big Mike Terms (Glossary) 0 July 2nd, 2010 12:37 PM
Limit Order LukeGeniol Terms (Glossary) 0 June 29th, 2010 02:38 AM


All times are GMT -4. The time now is 02:13 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-14 in 0.09 seconds with 27 queries on phoenix via your IP 54.221.76.68