NexusFi: Find Your Edge


Home Menu

 





Specific SL/TP for specific entries


Discussion in EasyLanguage Programming

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




 
 

Specific SL/TP for specific entries

 
 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

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
What broker to use for trading palladium futures
Commodities
ZombieSqueeze
Platforms and Indicators
 
 
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


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
Thanked by:
 
 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
 
 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
 
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

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

 



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