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,879 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?

  #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?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
Battlestations: Show us your trading desks!
18 thanks
  #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
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,537



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
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving 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
  #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
  #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
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,537


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
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving 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
  #6 (permalink)
skan
spain
 
Posts: 11 since Jun 2010
Thanks Given: 0
Thanks Received: 0

Thanks.

Reply With Quote
  #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
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,537

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
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving 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
  #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
  #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
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,537


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
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving 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
  #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
Thanked by:




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