Tarea técnica
Input parameter:
- Timeframe = 5 mins
- ATR length = 5
- Multiplier = 1
- RSI length = 14
- RSI Value =50
- Lot size = 0.01 lots.
Strategy Rules
Bullish Trade Entry:
If the price crosses above the supertrend value and the RSI >50, and the volume of the current candle is higher than the average volume of the last 3 candles.
- Close(1) > SuperTrend(1)
- Close(2) < SuperTrend(2)
- RSI(1) > 50
- Volume(1) > (Volume(2)+Volume(3)+Volume(1))/3
Bullish Trade Exit :
If the price crosses below the SuperTrend Value
- Close(1) < SuperTrend(1)
- Clsoe (2) > SuperTrend(2)
Bearish Trade Entry
If the price crosses below the supertrend value and the RSI <50, and the volume of the current candle is higher than the average volume of the last 3 candles.
- Close(1) < SuperTrend(1)
- Clsoe (2) > SuperTrend(2)
- RSI(1) > 50
- Volume(1) > (Volume(2)+Volume(3)+Volume(1))/3
Bearish Trade Exit :
If the price crosses above the SuperTrend Value
- Close(1) > SuperTrend(1)
- Close(2) < SuperTrend(2)
Crosses above the condition
- Close(1) > SuperTrend(1)
- Close(2) < SuperTrend(2)
Crosses below the condition
- Close(1) > SuperTrend(1)
- Clsoe (2) > SuperTrend(2)
Terms should be used in such a way
- Close(1) = previous candle (just closed)
- Close(2) = candle before that
- SuperTrend(1) = SuperTrend Value of previous candle (just closed)
- SuperTrend(2) = SuperTrend Value candle before that
- Volume(1) = Tick volume of the previous (just closed) candle
- Volume(2) = Tick volume of the candle before the previous one
RSI(1) RSI value of the previous (just closed) candle
Note
1. Make sure all the entries and exits will take place at the close price of the candle just closed
Only One Trade at a time, means once the bullish Trade is exited, then only we will look for a bearish trade and vice versa.
2. For Indicator
For SuperTren,d build a custom Indicator that can be plotted in any chart and use it with the help of iCustom() inside the EA
For RSI, use the default function iRSI() inside the EA
For Volum,e also use the default function iVolume() inside the EA
3. Maintain a tradelog of every trade and export it to a CSV file after every trade.
Format for the Trade log.
Symbol | Timestamp | Entry Time | Entry Price | Exit Time | Exit Price | PnL | Cumulative PnL
After every trade exit, the data should be appended into the tradelog CSV file.
4. For Debugging purposes. I need the following data for every iteration.
Timestamp | close Price| Super Trend Value | RSI Value| Volume | Entry Condition (True/False) |Exit Condition (True/False)
5. There should be a separate function for calculating SuperTrend, RSI, Volume, and Entry and Exit. During the entry and exit condition check, the program should call the values ofthe above function and use them for condition checking