Can't close triggered Long Limit order - NinjaTrader Programming | futures io social day trading
futures io futures trading


Can't close triggered Long Limit order
Updated: Views / Replies:1,324 / 6
Created: by vetl 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
 

Can't close triggered Long Limit order

  #1 (permalink)
Elite Member
Toronto, Ontario
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 11 since Nov 2011
Thanks: 0 given, 1 received

Can't close triggered Long Limit order

Hi all,

I'm trying to put together template for entry exit logic so it would be easy to code new strategies and got stuck on one portion where I can't close triggered long limit order. So, basically scenario is my 3 long limit orders are being triggered and when I try to to Exit long ninja doesn't close it, here is log from traceorder:


code to place the orders :

Order1 = EnterLongLimit(0,true,LotSize1, ePrice, "Order1");
Order2 = EnterLongLimit(0,true,LotSize2, ePrice, "Order2");
Order3 = EnterLongLimit(0,true,LotSize3, ePrice, "Order3");

Log :


4/10/2012 7:45:00 PM Entered internal PlaceOrder() method at 4/10/2012 7:45:00 PM: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=1 LimitPrice=101.08 StopPrice=0 SignalName='Order1' FromEntrySignal=''
4/10/2012 7:45:00 PM Entered internal PlaceOrder() method at 4/10/2012 7:45:00 PM: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=1 LimitPrice=101.08 StopPrice=0 SignalName='Order2' FromEntrySignal=''
4/10/2012 7:45:00 PM Entered internal PlaceOrder() method at 4/10/2012 7:45:00 PM: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=1 LimitPrice=101.08 StopPrice=0 SignalName='Order3' FromEntrySignal=''


execution event:
Execution='NT-00000' Instrument='CL 05-12' Account='Replay101' Name='Order1' Exchange=Default Price=101.08 Quantity=1 Market position=Long Commission=0 Order='NT-00000' Time='4/10/2012 7:50:00 PM'


Execution='NT-00001' Instrument='CL 05-12' Account='Replay101' Name='Order2' Exchange=Default Price=101.08 Quantity=1 Market position=Long Commission=0 Order='NT-00001' Time='4/10/2012 7:50:00 PM'

Execution='NT-00002' Instrument='CL 05-12' Account='Replay101' Name='Order3' Exchange=Default Price=101.08 Quantity=1 Market position=Long Commission=0 Order='NT-00002' Time='4/10/2012 7:50:00 PM'

here is the code that I'm executing to close orders:
ExitLong("Order1");
ExitLong("Order2");
ExitLong("Order3","");
ExitLong();

result:
4/10/2012 7:50:00 PM Entered internal PlaceOrder() method at 4/10/2012 7:50:00 PM: BarsInProgress=0 Action=Sell OrderType=Market Quantity=0 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal='Order1'
4/10/2012 7:50:00 PM Entered internal PlaceOrder() method at 4/10/2012 7:50:00 PM: BarsInProgress=0 Action=Sell OrderType=Market Quantity=0 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal='Order2'
4/10/2012 7:50:00 PM Entered internal PlaceOrder() method at 4/10/2012 7:50:00 PM: BarsInProgress=0 Action=Sell OrderType=Market Quantity=0 LimitPrice=0 StopPrice=0 SignalName='Order3' FromEntrySignal=''
4/10/2012 7:50:00 PM Entered internal PlaceOrder() method at 4/10/2012 7:50:00 PM: BarsInProgress=0 Action=Sell OrderType=Market Quantity=0 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''


Any suggestion pleaseee ??? I'm trying to close all orders at that time, if there is opposite signal.

Reply With Quote
 
  #2 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary

ExitLong() reliably closes orders. If it does not close your orders, there is a problem in your code elsewhere.

As you have not posted the entire strategy, nobody can help you unless you post it.

Reply With Quote
 
  #3 (permalink)
Elite Member
Toronto, Ontario
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 11 since Nov 2011
Thanks: 0 given, 1 received


I did a check with print message, condition is being triggered with "ExitLong" statements, i'm really confused where else can be the problem :S Can you confirm that ExitLong would close triggered LongLimitOrder ? if it is then probably I will need to comment out everything and enable block by block

Reply With Quote
 
  #4 (permalink)
Elite Member
Bala, PA, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus, IB
Favorite Futures: SPY, Oil, Euro
 
monpere's Avatar
 
Posts: 1,858 since Jul 2010
Thanks: 300 given, 3,276 received


vetl View Post
I did a check with print message, condition is being triggered with "ExitLong" statements, i'm really confused where else can be the problem :S Can you confirm that ExitLong would close triggered LongLimitOrder ? if it is then probably I will need to comment out everything and enable block by block

Are you sure NT is not ignoring the exits because they might violate their internal order rules? That's one of the reasons I now only use Unmanaged orders. You may want to also open a post on the NT support forum.

Reply With Quote
 
  #5 (permalink)
Elite Member
Toronto, Ontario
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 11 since Nov 2011
Thanks: 0 given, 1 received

Thank you for your input, I don't see any errors related to the internal handling rules in logs. Also another question iOrder object, will it become null after order is closed? or it will still have details from the last order ?

Reply With Quote
 
  #6 (permalink)
Elite Member
Denver, CO
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES
 
NinjaTrader's Avatar
 
Posts: 1,260 since May 2010
Thanks: 153 given, 1,890 received


vetl View Post
Thank you for your input, I don't see any errors related to the internal handling rules in logs. Also another question iOrder object, will it become null after order is closed? or it will still have details from the last order ?

The variable that holds the IOrder object will always contain the object untill you set the variable to null. The IOrder object itself will hold values in its properties for the order.

Reply With Quote
 
  #7 (permalink)
Elite Member
Toronto, Ontario
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 11 since Nov 2011
Thanks: 0 given, 1 received

Thank you for your information! I got Visual Studio for debugging now it became waaay easier. Now I need another word of advice, on how to track\distinguish orders that hit TP and got closed at tp ? For example I have 3 orders rolling with 3 different target prices, orderstatus is filled. But I can't find the way to say which one is filled and which one is not, this is to close any open orders on opposite signal or to know when to clear iOrder objects. Thank you for your help everyone. Should I use opposite stop order to simulate TP ? and when its hit have action done on that event ? Limit order for TP and stop orders for SL ?


Last edited by vetl; April 26th, 2012 at 11:31 PM.
Reply With Quote

Reply



futures io > > > > > Can't close triggered Long Limit 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
BofA is close to its limit for share issuance kbit News and Current Events 0 December 2nd, 2011 07:12 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 06:42 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-18 in 0.12 seconds with 19 queries on phoenix via your IP 54.163.209.109