작업 종료됨
명시
I already have an EA, namend here EA1, included source code, the behaviour is as follows:
1) a third party EA2, with magic number xxx is attached to chart and generates orders
2) EA1 is attached also to a chart, with same magic number xxx, and generates pending stop orders corresponding to orders generted by EA2
more in detail present situation is decribed here:
EA1 performs:
- opening a new buy or sell stop order when EA2 creates a real one
- closing the pending stop order when EA2 closes the corresponding real order.
More in detail EA1 behaviour is: imagine a pending stop order (eg. BUY) becomes active, and then hits TP or SL or TS and closes. in this case EA1 generates another pending order like the previous (eg. BUY) at a pricing level that is at N pips from current price. so N=number of pips from current price for pending order regeneration, is a input parameter for your EA. the regenerated pending order inherits all the rest of parameters as the provious (size, TP, SL, TS).
the input parameters for EA1 are:
- order size
- SL in pips
- TP in pips
- distance from corresponding real order in pips
- trailing stop in pips
- regeneration distance from current price
----------------------------------------------------------------------------------
new enhancements for EA1
the requested enhacements are described as follows:
1) a traling-like feature will be added to pending orders. Trailing will apply to pending orders, that once created will be moved towards the price as this goes further in the opposite direction.
for example, for a buy stop pending order, say it will be created at price 1,04567, which is 2 pips from current price 1,04547.
as price goes lower, say 1,04537, pending order will be moved 1 pip down in order to keep 2 pips distance from current price, so at 1,04557.
Pending order Trailing feature can be enabled-disabled.
2) another feature will be added, which will be applied when a new pending order is generated, in detail:
1) if the previous order was closed for TP or TS, the new pending order will be created at distance D1 in pips from current price.
2) if the previous order was closed for SL, the new pending order will be created at distance D2 in pips from current price.
so D1 and D2 are two new input parameters for EA (in present version D1=D2, now we ask to make a difference)