NexusFi: Find Your Edge


Home Menu

 





Get the name of the order filled?


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one skan with 6 posts (0 thanks)
    2. looks_two Big Mike with 5 posts (2 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 TheTrend with 1 posts (1 thanks)
    1. trending_up 10,765 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 12 posts
    2. attach_file 0 attachments




 
Search this Thread

Get the name of the order filled?

(login for full post details)
  #1 (permalink)
skan
spain
 
Posts: 11 since Jun 2010
Thanks Given: 0
Thanks Received: 0

Hello

imagine I place several stop orders on the market and one is filled.
How can I get from an easylanguage strategy the name (or reference) of the stop order filled?
The code to be executed later depends on that.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Request for MACD with option to use different MAs for fa …
NinjaTrader
Trader Dale [email protected] or Scammer Dale
Trading Reviews and Vendors
ISO Equity Curve Indicator
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tao te Trade: way of the WLD
32 thanks
GFIs1 1 DAX trade per day journal
28 thanks
Supertradersams Thread Journal on NQ/MNQ
23 thanks
Deaddogs Stock Trading
13 thanks
Just another trading journal: PA, Wyckoff & Trends
12 thanks

(login for full post details)
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,349



skan View Post
Hello

imagine I place several stop orders on the market and one is filled.
How can I get from an easylanguage strategy the name (or reference) of the stop order filled?
The code to be executed later depends on that.

You can name signals:

 
Code
                            
Buy ("Entry pattern A"Next Bar At Market
Also you can track how many positions or contracts are open ("CurrentContracts"). Then just do the math, if you went long 5 contracts and there are only 4 currently in the market, the contract with the nearest stop or target is out.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
(login for full post details)
  #4 (permalink)
skan
spain
 
Posts: 11 since Jun 2010
Thanks Given: 0
Thanks Received: 0

Hi

That way you show a tag next to each order on the graph window,
but how do you get it from within the code?


For example
Buy ("Entry1") Next Bar At function1 stop;
Buy ("Entry2") Next Bar At function2 stop;
Buy ("Entry3") Next Bar At function3 stop;


And next bar I want to know which of these stops was triggered
If it was Entry1 I'll execute some extra code Code1
If it was Entry2 I'll execute some extra code Code2
If it was Entry3 I'll execute some extra code Code3

Reply With Quote
(login for full post details)
  #5 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,349


skan View Post
Hi

That way you show a tag next to each order on the graph window,
but how do you get it from within the code?


For example
Buy ("Entry1") Next Bar At function1 stop;
Buy ("Entry2") Next Bar At function2 stop;
Buy ("Entry3") Next Bar At function3 stop;


And next bar I want to know which of these stops was triggered
If it was Entry1 I'll execute some extra code Code1
If it was Entry2 I'll execute some extra code Code2
If it was Entry3 I'll execute some extra code Code3

The way I do it is like I said, I just track based on the number of CurrentContracts in the market, and I write my code in a way so that the 'nearest target' or 'nearest stop' code gets executed first when the CurrentContracts number drops.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
(login for full post details)
  #6 (permalink)
skan
spain
 
Posts: 11 since Jun 2010
Thanks Given: 0
Thanks Received: 0

Thanks.

Reply With Quote
(login for full post details)
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,349

If there is a better way I'd like to know as well, but I don't think there is an EL function to sell 'named' orders.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
(login for full post details)
  #8 (permalink)
skan
spain
 
Posts: 11 since Jun 2010
Thanks Given: 0
Thanks Received: 0

The problem with this aproach is that many different orders could be triggered on the same (or similar) value and it could be impossible to tell them apart.

Reply With Quote
(login for full post details)
  #9 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,349


skan View Post
The problem with this aproach is that many different orders could be triggered on the same (or similar) value and it could be impossible to tell them apart.

If you wrote it in C# and linked a DLL it might work, where you can just write a function to submit and sell an order, and have it tracked.

Doing it all in EL, the only other way I can think of is to use the entry time (if multiple entries per bar) or the entrybar to track which order is which.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
(login for full post details)
  #10 (permalink)
 TheTrend 
Paris, France
 
Experience: Advanced
Platform: Amibroker
Trading: Futures, Stocks
Posts: 95 since Jun 2011
Thanks Given: 118
Thanks Received: 105


You can use the function entryname, I've discovered that today

Example:
if entryname(0) = "Entry1" then execute code 1
if entryname(0) = "Entry2" then execute code 2

Hope that helps !

Reply With Quote
The following user says Thank You to TheTrend for this post:





Last Updated on September 16, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts