Termos de Referência
I need a panel to enter at market price along with bracketed orders, so, on panels I need:
- two buttons BUY and SELL
- option to be flagged for trailing stop loss (if flagged 3 more parameters are needed to manage trailing stop loss)
- TP & SL input box as pips (default values: TP=20 pips, SL=10pips)
- Lot size (default is 0.01)
BUY
When I need to enter long, pressing BUY button, a position will be opened with TP and SL levels setted as input parameters on panel. At same time, two O-C-O(one cancel other) orders will be placed:
- Sell Limit order with entry level equal at TP level of original entry point with same parameters for TP/SL
- Sell stop order with entry level equal at SL level of original entry point with same parameters for TP/SL
SELL
When I need to enter short, pressing SELL button, a position will be opened with TP and SL levels setted as input parameters on panel. At same time, two O-C-O(one cancel other) orders will be placed:
- Buy Limit order with entry level equal at TP level of original entry point with same parameters for TP/SL
- BUY stop order with entry level equal at SL level of original entry point with same parameters for TP/SL
If Trailing option is flagged, ONLY for orders and NOT for original position opened at market price, a trailing stop will be used. So 3 additional parameters are needed:
TS Start(when trailing is triggered): default 10 pips
TS Stop(where to move SL first time): default 5 pips
TS Step: default 0.5 pips (I use 5 digits)
So when profit touch "TS Start", SL is moved to "TS Stop", and incremental stops are setted in TS Step.
Example with long position, let suppose that position is opened at 1.1500 for EUR/USD
Panel will enter at 1.1500 with a TP=1.1520 and SL=1.1490 AND will place the two following orders:
- Sell limit order @1.1520 with TP=1.1500 and SL=1.1530
- Sell stop order @ 1.1490 with TP=1.1470 and SL=1.1510
If and when an entry level for an order is hit, other order is immediately canceled.
Francesco