Hi,
I am new here and I am not programmer (yet). I have an idea I want to share with you all and finally check it in practice / test.
I found interesting piece of program (autor Joni) which I modified a little bit.
Originally ROBOT buys or sells when RSI riches levels 30 or 70.
It buys a few times at 30 and finally closes all buy-op at 70. Same for sell op at 70 RSI level.
This tactic unfortunately leads to big looses so I decided to change this.
Practice shows that usually the very last operations from continuing buying/selling are profitable. That is why lot is variable. Robot changes it , Lot starts from 0.01 and increase it *2 or according to simple function (or factor).
Generally I also don't want to trade with lot >2 so I put the limit:
It works perfectly...
To avoid keeping loose ops too long I would like to control them at every bar close or thick. Let's say if all opened ops loos is about to 50$ I would like to close all ops straight away:
Very often trading goes 'in wrong direction' from the beginning. In that case I don't want to increase lot and closeAllSell / closeAllBuy at assuming loss level . Let's say :
if SellProfit > -10$ - close all ops.
And finally :
I found a piece of code what can control opened positions :
The problem is : I don't know how to us it :) Where to paste it :)
I tried here :
It checks opened positions but only if RSI is at 70 / 30. It doesn't satisfy me...
I am sorry for my broken English. I hope that everyone who wanted understand my idea could understand...
Any help ? :)
Kind regards
Kris
Automated Trading and Strategy Testing
- www.mql5.com
MQL5: language of trade strategies built-in the MetaTrader 5 Trading Platform, allows writing your own trading robots, technical indicators, scripts and libraries of functions
- Request Execution - Opening and Closing Positions - Trade - MetaTrader 5 for iPhone
- Request Execution - Opening and Closing Positions - Trade - MetaTrader 5 for Android
- Trading Principles - Trade - MetaTrader 5 for iPhone
Alain Verleyen:
Thank you very much Dude :)
Kind Regards
Kris
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register