Работа завершена
Техническое задание
Grid EA Strategy
Indicators:
1) Exponential Moving Averages (after candle close)
- Make in-put lengths for Fast EMA and Slow EMA
2) RSI (after candle close)
- Make in-put for the RSI periods
- Make in-put for determining 1) overbought RSI level and 2) oversold RSI level
- Include option true/false to include indicator as filters to open new position.
Signal to open position (calculate after candles close)
1) EMA Signal types (make list to select which signal to use)
1.1) EMA crossover signal
- Fast EMA crossover Slow EMA = Open Long
- Fast EMA crossunder Slow EMA = Open Short
1.2) Price Over and under both EMA lines
- Price close above both EMA = Open Long
- Price close below both EMA = Open Short
1.3) 1 EMA, use only fast EMA
- Price close above EMA line = Open Long
- Price close below EMA line = Open short
Filters for opening positions:
Make True/false to choose whether to include filters
1) After closing position(s), new position cannot be opened after number of candles have been closed
- Add in-put for number of candles to wait before new position can be opened
2) RSI level
- Long position, RSI must not be in the overbought level.
- Short position, RSI must not be in the oversold level.
Trade Direction:
1) single direction (does not open additional position/cycle with new signal if there is already a cycle active)
- Only open 1 type of position until the cycle finish.
Example: if a Long position is opened and a signal for short happen later, the short position will not be opened. The current Long position cycle has to be closed first.
2) Both directions (A long and short position/cycle can be opened when there is signal, however only 1 cycle of each type can be active)
Grid Strategy
In-puts
1) Distance to open additional position in both direction: points
2) Lot multiplier: 1 decimal
3) Lot size: min as per specification
4) Group take profit
Types: total profit in amount or at number of grid distance
- Total profit amount to close - in-put for the profit target amount
- After Number of grid position opened - in-put number of grid positions opened (maximum 9).
Example: grid distance = 200 points, number of grid positions to close all position. Take profit = at 9th grid. If the price hit all grid line for this setting, 8 positions will be opened and at the 9th grid all positions will be closed to take profit i.e. 200*9 = 1800 points, all the 8 positions opened will be closed.
5) Stop loss/ after opening multiple position and adjust after each position added) for both in the right direction.
First position will have upper and below grid with no stop loss. Stop loss is added from 2nd positions and onward. The stop loss is adjusted when price hit another grid line and new position is added i.e. 3rd, and 4th positions. There is distinction between stop loss for positions in the right direction and wrong direction.
I want the stop loss to be adjusted based on the latest position opened in the cycle.
Long position in the right direction = latest position price minus number of points.
Long position in the wrong direction = latest position price plus number of points.
Short position in the right direction = latest position price plus number of points.
Short position in the wrong direction = latest position price minus number of points.
Price goes in the right direction = when price go in direction of the position opened
For the price going in the right direction there must be in-put for each grids level. Since the maximum to close and take profit is 9th grid. There will be 8th stop loss in-put for price going into right direction
In-put for price right direction: make It adjustable
Example:
Stop loss 1st grid: last price for the additional positioned opened minus(long)/plus in-put(short) (30 points)
Stop loss 2nd grid: last price for the additional positioned opened minus(long)/plus in-put (25)
Stop loss 3rd grid: last price for the additional positioned opened minus(long)/plus in-put (20)
Stop loss 4rd grid: last price for the additional positioned opened minus(long)/plus in-put (15)
Stop loss 5th grid: last price for the additional positioned opened minus(long)/plus in-put (10)
Stop loss 6th grid: last price for the additional positioned opened minus(long)/plus in-put (10)
Stop loss 7th grid: last price for the additional positioned opened minus(long)/plus in-put (10)
Stop loss 8th grid: last price for the additional positioned opened minus(long)/plus in-put (5)
unlimited grid for price going into wrong direction
Example:
In-put for the wrong direction:
Stop loss 1st grid: last price for the additional positioned opened minus(short)/plus in-put(long) (30)
Stop loss 2nd grid: last price for the additional positioned opened minus(short)/plus in-put(long) (25)
Stop loss 3rd grid: last price for the additional positioned opened minus(short)/plus in-put(long) (20)
Stop loss 4rd grid: last price for the additional positioned opened minus(short)/plus in-put(long) (15)
Stop loss 5th grid: last price for the additional positioned opened minus(short)/plus in-put(long) (10)
Stop loss 6th grid: last price for the additional positioned opened minus(short)/plus in-put(long) (10)
Stop loss 7th grid: last price for the additional positioned opened minus(short)/plus in-put(long) (10)
Stop loss 8th grid: last price for the additional positioned opened minus(short)/plus in-put(long) (5)
Stop loss from 9th and onward: last price for the additional positioned opened minus(short)/plus in-put(long) (5)