Trabalho concluído
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Termos de Referência
Hi I need EA based on this strategy Envelope /Rsi strategy:
Trading Signal:
Execution of the signal :
Market order- as soon as signal is given, buy/sell order is opened
Pending order – If buy signal is given, buy stop order will be placed on predefined distance, and expire after x minutes, if sell signal is
Buy Conditions:
Ask Price of the open /current candle must be equal to lower band of Envelope price value, the body of the candle must cross from above cross the line below.
Rsi /optional , with true or false bellow in settings
Rsi must be equal or bellow predefined level ( for example equal or bellow 30)
Sell Conditions:
Bid Price of the open /current candle must be equal to upperer band of Envelope , the body must cross the envelop line from bellow through the line above.
RSi /Optional with true or false bellow in settings
Rsi must be equal or above predefined level ( for example equal or above 70)
Ea will observe only current candle, and it can be only one trade open with Ea, with exact magic number defined in the field Magic Number, no new positions will be opened by this ea until previous are closed, or if other positions are opened by eas with magic numbers set in the field: No Trade Magic
Ea Settings:
Max Spread:15 ( max spread value in points)
Magic Number - 999 ( for example), every trade needs to be labeled with magic number
No Trade Magic - 2341,3456,3221,2344,34556... (for example)- purpose of this function is to stop ea from opening new orders if orders/trades with these magic number/numbers are already opened. For example trade positions Buy ( it can be one or more) is opened with magic number 2341 and Sell( one or more positions) with magic 3456, Ea will not open any new trade or manage sl tp Breakeven, TS on its existing position opened under predefined magic, 999 for example.
Trade execution: Market/Pending ( if market is chosen, ea will place buy / sell order, and then sl /tp)
Pending order distance in points:20 – if pending execution is set, then once signal is given, ea will place buy stop or sell stop, on a predefined distance. Example, price is going down, and signal for buy is generated, ea will place buy stop on 20 points distance, if price continue to go down even more, ea will move pending order to a predefined distance. Ea will stop modifying pending order distance when price starts going up, vice versa for sell.
Pending order expiry in minutes: 5 ( number represent minutes)
Trade Management Settings / In points
Lot Size : 0.1 / fixed lot size
Take Profit : 200 / take profit is in points. If placed 0, ea will open position without placing TP
Stop Loss: 50 / Stop loss is in points. If placed 0, ea will open position without placing SL
Break Even points: 100 / Once the profit reach predefined points it will place SL as defined in Break even points to lock option
Break even points to lock :70 / once the Break even points has been reached, ea will move sl to defined value in this field.
Trailing from Break Even points: 50 / This serves as a Trailing Stop and it should move sl only after the break even has been made, and value from Break Even points moved 50 points more(example)
Trailing Step :20 / After the price moves predefined points in profit( value from Trailing from Break Even points ), new sl will be established based on this field values
Example based on above values:
Price has moved 100 points, based on Break Even points 100, SL has been moved to 70 points based on Break even points to lock value.
Price Moved additional 50 points( based on Trailing from BreakEven points), and sl moved to +20 (based on Trailing Step value). So far 70 +20 =90. If price moves more it will keep the ratio 50 / 20 as defined bye Trailing options. So TS it will work only after Break even price has been stablished, and Sl moved.
Indicator Settings:
-Envelope is working engine of the strategy, default options from MT4 Envelope platform will be used
Envelope Settings
Period : 3
MA Method: Linear Weighted/Simple/ Exponential/Smoothed
Apply To: Open/Close
Deviation:0.007%
RSI indicator: True/False
Period:18
Apply to: Open/Close
Buy Signal: 30
Sell Signal:70
Comment: xzs / comment will be placed here