Apprentice wrote:The simplest way would be, to write this strategy for you.
Can you define all the conditions?
You can use RSI_Strategy.lua as a template.
viewtopic.php?f=31&t=2828&hilit=rsiMaybe you can learn from the code.
For interested, I hold private lessons.
However, it seems to me, you are not the best candidate.
Thanks for your important suggestion. I think it's better to write the strategy by you and I learn rather than discuss the principle here.
Here below is the conditions:
leverage:
1. can be set from 1~100 and trading amount is based on the leverage.
For bull deviation:
1. timeframe is 5 minutes
2. start following calculation when RSI level is more than 80
3. RSI[lastestfinished TF] > RSI[lastestFinished TF - 1]
4. candle.hight[lastestfinished TF] < candle.high[lastestFinished TF - 1]
5. if 2,3,4 are satisfied on m5 TF, open a sell trade and set trailing step stop of 15pips(where 8 could be configure when start the strategy). set the flag isTrading to true.
6. if isTrading is true, ignore checking 2,3,4 in next tick.
For bear deviation:
1. timeframe is 5 minutes
2. start following calculation when RSI level is less than 20
3. RSI[lastestfinished TF] < RSI[lastestFinished TF - 1]
4. candle.hight[lastestfinished TF] > candle.high[lastestFinished TF - 1]
5. if 2,3,4 are satisfied on m5 TF, open a buy trade and set trailing step stop of 15pips(where 8 could be configure when start the strategy). set the flag isTrading to true.
6. if isTrading is true, ignore checking 2,3,4 in next tick.
For close position of the trade:
1. set limit to 50pips
2. using trailing step stop to check out
3. when close, set isTrading to false.
It's the conditions. Could you help to write a strategy for it? Thank you in advance!