Hi,
I want to combine two strategies into one using "Entry("EntryName") to disquisition the specific entries and then attach a Limit exit. I know this code is way wrong but is there a simple way to associate a specific Entry to a Limit Exit Order?
Input:
TP(50); //Profit target
if t=900 then
Buy("Entry1") next bar Market;
if t=1000 then
Buy("Entry2") next bar Market;
SetStopShare;
If Entry("Entry1")
then SetProfitTarget(TP);
If Entry("Entry2")
then SetProfitTarget(TP);
Need code help
Re: Need code help
I don't believe you can do this through the SetProfitTarget command. However, you can do this using sell limit orders using the "sell from entry()" syntax that's shown here:
http://www.multicharts.com/trading-soft ... x.php/Sell
For your example, just change the last two lines to:
Where Value1 and Value2 are your limit prices.
http://www.multicharts.com/trading-soft ... x.php/Sell
For your example, just change the last two lines to:
Code: Select all
Sell from Entry ("Entry1") at Value1 limit;
Sell from Entry ("Entry2") at Value2 limit;