NexusFi: Find Your Edge


Home Menu

 





Specific SL/TP for specific entries


Discussion in EasyLanguage Programming

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




 
Search this Thread

Specific SL/TP for specific entries

  #1 (permalink)
 avasfx 
Poland
 
Experience: Intermediate
Platform: Multicharts, RealTest
Broker: AMP, TradeNation, IntractiveBrokers
Trading: ES, DAX, YM, FTSE
Posts: 23 since Jul 2009
Thanks Given: 15
Thanks Received: 1

Hello, lately i was thinking and can't figure it out, how can I place specific SL/TP for specific entries? I mean I have one strategy file where I defined 2 types of entries:
1) mean reversion and
2) trend following.
And for every type of entry I want to define specific SL/TP parameters. From my present knowledge of PowerLanguage I can’t figure it out. If I type something like:
 
Code
if marketposition = 1 then begin
in this case I’m telling EL about every long position, without distinction on strategy 1 or 2. Maybe there is some possibility to use names of the entry…

The only thing I can handle it right now is by creating new strategy(file) for every strategy

Thanks, Alex

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Spoo-nalysis ES e-mini futures S&P 500
24 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627


avasfx,

you can tie exits to entry names and this way Multicharts will only apply the respective exit your particular entry. The information in the wiki should get you going:
https://www.multicharts.com/trading-software/index.php/Sell

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
 avasfx 
Poland
 
Experience: Intermediate
Platform: Multicharts, RealTest
Broker: AMP, TradeNation, IntractiveBrokers
Trading: ES, DAX, YM, FTSE
Posts: 23 since Jul 2009
Thanks Given: 15
Thanks Received: 1


ABCTG View Post
avasfx,

you can tie exits to entry names and this way Multicharts will only apply the respective exit your particular entry. The information in the wiki should get you going:
https://www.multicharts.com/trading-software/index.php/Sell

Regards,

ABCTG

Thanks a lot. That's what i was looking for!

Started this thread Reply With Quote
  #5 (permalink)
 avasfx 
Poland
 
Experience: Intermediate
Platform: Multicharts, RealTest
Broker: AMP, TradeNation, IntractiveBrokers
Trading: ES, DAX, YM, FTSE
Posts: 23 since Jul 2009
Thanks Given: 15
Thanks Received: 1

and what about setstoploss_pt() and setprofittarget_pt()? I mean i have 2 strategies one is for long side and one is for the short side. Each have specific ST and SL settings, but when i put them both on the chart to autotrade, when position is open TP and SL are applied from 2 strategy files.
I was thinking on using only one strategy file, but then again, is that possible to use setstoploss_pt() and setprofittarget_pt() with it? Or just to use something like: "sell ("....") entry(".....") next bar entryprice+8 limit"?




ABCTG View Post
avasfx,

you can tie exits to entry names and this way Multicharts will only apply the respective exit your particular entry. The information in the wiki should get you going:
https://www.multicharts.com/trading-software/index.php/Sell

Regards,

ABCTG


Started this thread Reply With Quote
  #6 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

avasfx,

for that situation you would either have to combine both strategies into one code and only use one set of setstoploss_pt() and setprofittarget_pt() (or remove setstoploss_pt() and setprofittarget_pt() from the two strategies and place it within a third separate strategy that you add to the same chart). You could use different inputs for the two reserved words depending on the market position, but this might result in your entries still using the inputs from the previous trade during the entry bar.

However, it might be the better approach to specifically code target and stop exits for each entry using actual orders.

Regards,

ABCTG


avasfx View Post
and what about setstoploss_pt() and setprofittarget_pt()? I mean i have 2 strategies one is for long side and one is for the short side. Each have specific ST and SL settings, but when i put them both on the chart to autotrade, when position is open TP and SL are applied from 2 strategy files.
I was thinking on using only one strategy file, but then again, is that possible to use setstoploss_pt() and setprofittarget_pt() with it? Or just to use something like: "sell ("....") entry(".....") next bar entryprice+8 limit"?


Follow me on Twitter Reply With Quote




Last Updated on March 10, 2020


© 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