工作已完成
指定
I need a programmer to help me create a hedging EA as following logic:
The first order is based on RSI: if RSI is above 50 open a buy trade and if below 50 open a sell trade.
After the first order is opened, immidiately open a stop order (buy stop or sell stop) in opposite direction a number of pip above sell order or below buy order with double lot size. If the second order is triggered, immidiately open a stop order in opposite direction to the second order with double lot size . ..... and so on for third, fouth....... orders.
If the total profit from all orders reach a specific $ value (this value is a input parameter of EA), the EA must close all opeing orders and delete the stop order. After closing orders it will immidiately start the cycle again.
Here is an example.
If the RSI is above 50, the EA open a buy order with 0.1 lot and then open a sell stop order 10 pips below the opening price of the first order with 0.2 lot. If the second order is triggered, the EA must open a buy stop order 10 pips above the opening price of the second order with lot size 0.4 and so on........ for the third, fourth, fifth ........orders.
If the total profit of all opening orders reach a $ value, let say $20, then the EA must close all opening orders and the stop order as well. After that the cycle starts again.
The lot size of the first order, the $value of profit target, the number of pip to open stop order must be input parameters of the EA. The EA should also have common features like magic number, trading hour, comment........ and should be useable with nonUSD account.