NexusFi: Find Your Edge


Home Menu

 





"from Entry ("Entry_Name')" exit help


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,171 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
Nervous Cat
san francisco Ca USA
 
Posts: 5 since Jun 2013
Thanks Given: 1
Thanks Received: 0

Hi,

Do anyone know how to code a"... from Entry ("EntryName")" exit to a SetProfitTarget( ProfitTargetAmt? I'm using the "from Entry" because I want to trade multiple strategies on one instrument.

For example:

//Entry

if t=900 then begin
Buy("LE_1") next bar at market;
end;

// Exit I need help with
If ProfitTargetAmt >0 then SetProfitTarget( ProfitTargetAmt) from Entry("LE_1");


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Beijing Summit Closes: Xi Pledges Hormuz Help -- $1.14B …
Prediction Markets & Event Contracts
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
More Than Capable: Hegseths War Warning Validates $114M …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643


Nervous Cat,

this is not possible, you'd have to create individual exit orders instead of the build in reserved words to tie the entry to the exit.

Regards,
ABCTG


Nervous Cat View Post
Hi,

Do anyone know how to code a"... from Entry ("EntryName")" exit to a SetProfitTarget( ProfitTargetAmt? I'm using the "from Entry" because I want to trade multiple strategies on one instrument.

For example:

//Entry

if t=900 then begin
Buy("LE_1") next bar at market;
end;

// Exit I need help with
If ProfitTargetAmt >0 then SetProfitTarget( ProfitTargetAmt) from Entry("LE_1");


Follow me on X Reply With Quote
  #4 (permalink)
Nervous Cat
san francisco Ca USA
 
Posts: 5 since Jun 2013
Thanks Given: 1
Thanks Received: 0

ABCTG,

I referenced my "TS Made Easy" book and it suggests using "AT$" to reference the price for the bar that generated the order. But I can't get it to work. MultiCharts and my TS referance library do not have At$ listed as a command.

The book suggests:
Sell from Entry("EntryName") Next Bar AT$ close + 1 point Limit;

Is there another way to reference a specific entry price?


Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

Nervous Cat,

with Multicharts look into the Strategy Position Trades reserved words, they give a lot of information. In your case PosTradeEntryPrice( 0, 0 ) will give you the entry price of the first leg into the currently open position.

Regards,
ABCTG


Nervous Cat View Post
ABCTG,

I referenced my "TS Made Easy" book and it suggests using "AT$" to reference the price for the bar that generated the order. But I can't get it to work. MultiCharts and my TS referance library do not have At$ listed as a command.

The book suggests:
Sell from Entry("EntryName") Next Bar AT$ close + 1 point Limit;

Is there another way to reference a specific entry price?


Follow me on X Reply With Quote
Thanked by:
  #6 (permalink)
Nervous Cat
san francisco Ca USA
 
Posts: 5 since Jun 2013
Thanks Given: 1
Thanks Received: 0


ABCTG View Post
Nervous Cat,

with Multicharts look into the Strategy Position Trades reserved words, they give a lot of information. In your case PosTradeEntryPrice( 0, 0 ) will give you the entry price of the first leg into the currently open position.

Regards,
ABCTG

Thats' perfect. Now I'm trying to get it to execute a limit order correctly. Not easy (nothing is).

Thanks you.


Reply With Quote




Last Updated on November 7, 2014


© 2026 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 - Downloads - Top
no new posts