NexusFi: Find Your Edge


Home Menu

 





"from Entry ("Entry_Name')" exit help


Discussion in EasyLanguage Programming

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




 
Search this Thread

"from Entry ("Entry_Name')" exit help

  #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?
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
REcommedations for programming help
Sierra Chart
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


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 Twitter 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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

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 Twitter 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


© 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