Special bracket order-- help requested

Questions about MultiCharts and user contributed studies.
Rohan2008
Posts: 1
Joined: 06 Aug 2013

Special bracket order-- help requested

Postby Rohan2008 » 06 Aug 2013

Hi Everyone,

I am trying to figure out if I can setup a strategy where a bracket order gets triggered only when the price hits a certain number... can we do this in Multicharts?

For example, I would like to setup a rule stating the following:

Lets say that the current price is $13 and I anticipate the price to fall down. Can I set a trade that states that if the price hits $10.02, setup an entry (buy stop) at $11.10 and if I enter the trade, the s/w automatically sets up a stop loss (sell stop) at say $9.00 and a profit target at T1 (say $11)... a classic bracket order.

I know that Multi charts strategy templates lets me set a bracket order, but does it let me set it such that the bracket order gets triggered ONLY when the price hits a certain price automatically without my intervention? I would like to setup my trades and get away from the computer.... the more I stare at it, the more mistakes I tend to be making.

thanks,
Rohan

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Special bracket order-- help requested

Postby TJ » 06 Aug 2013

Hi Everyone,
I am trying to figure out if I can setup a strategy where a bracket order gets triggered only when the price hits a certain number... can we do this in Multicharts?
For example, I would like to setup a rule stating the following:
Lets say that the current price is $13 and I anticipate the price to fall down. Can I set a trade that states that if the price hits $10.02, setup an entry (buy stop) at $11.10 and if I enter the trade, the s/w automatically sets up a stop loss (sell stop) at say $9.00 and a profit target at T1 (say $11)... a classic bracket order.
I know that Multi charts strategy templates lets me set a bracket order, but does it let me set it such that the bracket order gets triggered ONLY when the price hits a certain price automatically without my intervention? I would like to setup my trades and get away from the computer.... the more I stare at it, the more mistakes I tend to be making.
thanks,
Rohan
see post #5
viewtopic.php?f=16&t=10811

The Global Exits are automatically entered when the entry order is filled,
and automatically cancelled when the position is flattened.

User avatar
furytrader
Posts: 354
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 155 times
Been thanked: 217 times

Re: Special bracket order-- help requested

Postby furytrader » 07 Aug 2013

It wouldn't be too hard to set up this kind of order as a system in EasyLanguage.

You could do something like this:

Code: Select all

Inputs: BuyTrigger(10.02), LongEntry(11.10), LongProtectiveStop(9.00),LongTarget(12);
Vars: FreshTrade(TRUE), WorkTrade(FALSE);

If Date <> Date[1] Then Begin // Resets values at beginning of day
FreshTrade = TRUE;
WorkTrade = False;
End;

If (EntriesToday(Date) > 0) Then Begin // Only allows one trade per day
FreshTrade = False;
WorkTrade = False;
End;

If FreshTrade = TRUE and Close = BuyTrigger Then WorkTrade = TRUE;
If WorkTrade = TRUE Then Buy Next Bar At LongEntry STOP;

If MarketPosition_At_Broker_For_The_Strategy = 1 Then Sell Next Bar At LongProtectiveStop STOP;

If MarketPosition_At_Broker_For_The_Strategy = 1 Then Sell Next Bar At At LongTarget LIMIT;
The code above is just a suggestion - you should work with it to make sure it does what you want. Note a few things about this code:

1) It only trades once a day;
2) It only goes long (although it wouldn't be hard to make it go short too);
3) This will work fine for live trading but may need to be tweaked for backtesting purposes;
4) I put in a target of 12.00 since your example had a target of 11 but an entry point of 11.02.

If this doesn't help, just let me know and I'll see if there is anything else I can come up with. It's likely that others will have better ideas too.

Good luck!


Return to “MultiCharts”