Hello,
here is my first system, very simple, based on an Rsi, that I share with you. It seems to work well on Dax and FTSE, from 8am to 11am, with a spread of 1pt, over 5 seconds. I’m running it in a demo for the moment.
Suggestions and improvements are welcome 🙂
– Could someone could do a test over a longer period?
– The trades are closed at 11am. What line of code to add to close at the end of the last trade launched rather than the fixed schedule?
– Other indices to test?
Thank you for your contributions 🙂
Moderators Edit: Topic title modified. Please try to use more meaningful titles in future topics.
/// WINNIE 5S TRADE v2///
/// Dax & FTSE
/// Spread 1 pt
// Définition des paramètres du code
DEFPARAM CumulateOrders = false // Cumul des positions désactivé
// Annule tous les ordres en attente et ferme toutes les positions à 0:00, puis empêche toute création d'ordre avant l'heure "FLATBEFORE".
DEFPARAM FLATBEFORE = 080000
// Annule tous les ordres en attente et ferme toutes les positions à l'heure "FLATAFTER"
DEFPARAM FLATAFTER = 110000
// Conditions pour ouvrir une position acheteuse
indicator1 = RSI[14](close)
c1 = (indicator1 <= 30)
IF c1 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Conditions pour fermer une position acheteuse
indicator2 = RSI[14](close)
c2 = (indicator2 >= 70)
IF c2 THEN
SELL AT MARKET
ENDIF
// Conditions pour ouvrir une position en vente à découvert
indicator3 = RSI[14](close)
c3 = (indicator3 >= 70)
IF c3 THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// Conditions pour fermer une position en vente à découvert
indicator4 = RSI[14](close)
c4 = (indicator4 <= 30)
IF c4 THEN
EXITSHORT AT MARKET
ENDIF
// Stops et objectifs
SET STOP pLOSS 10
Very interesting Winnie !
How does it work on demo ? Do you have slippage or strange things or difference with the backtest ?
Because a 5 s timeframe is very quick and i’m not sure i can work in real mode… Idem for a stop loss very close at 10 points…. I’m not sure that as so small stop loss works with IG
I will work on it and make a return.
Yes indeed, too much difference between the bactest and the demo result this morning.
However, if you have some ideas to improve, welcome !
better with a Stop loss 12…Others suggestions to improve?