Adolfo

ALEX AutoTradingBot INDEX

Category: Strategies By: Adolfo Created: June 3, 2016, 12:27 PM
June 3, 2016, 12:27 PM
Strategies
140 Comments
ALEX AutoTradingBot INDEX

This strategy was explained at The Forex Day in Madrid by Lex Smirnoff in 2015. I’m Adolfo so, A-LEX will be a beautiful name for it! :-). Is explained to trade it in GBP/USD in 1 hour chart.
Since I <3 indexes like DAX or DOW couln’d wait to test it. Since March I’m doing discretionary trading on both markets in a real account, with profitable results (38,12%), first trades were made with 7% risk per trade, but I’ll no longer recommend it for you or anyone, it’s crazy!

A lot of entrance were missed by my fault, just wondering about if it’s a good moment or not…. will keep rising? or not? Low confidence took me here, and finally I can share it with you, is already automated. Enjoy it!

Requirements

.ITF file: ALEX ATB Indicator Signal (Click and get it)

Indicator code:

REM Variables
mm = Exponentialaverage[8](close)
once uma=Highest[8](high)
once umb=Lowest[8](low)
objetivo=45*pipsize

if High > mm and Low < mm then // TOuching Ema8
tb = BarIndex
ltp = mm
uma = mm
umb = mm
endif

if low>mm then //  New bullsih movement
n = BarIndex - tb
uma=Highest[n](high)
umb=mm
endif

if high<mm then //  New bearish movement
m = BarIndex - tb
umb=Lowest[m](low)
uma=mm
endif

if (uma-ltp)>objetivo and uma>mm then // buy condition
compra=1
endif
if (uma-ltp)<=objetivo then
compra=0
endif

if (ltp-umb)>objetivo and umb<mm then // short condition
venta=-1
endif
if (ltp-umb)<=objetivo then
venta=0
endif

Return compra coloured(0,128,0) as "compra",  venta coloured(220,20,60) as "venta"

Recomendations

3000 € / $ and max risk of 2% per trade.

Indicators

ExponentialAverage[8](close)
ExponentialAverage[18](close)

How it works

Firstly, is a simple trend following system.

Look for a fast price move in whatever direction, this movement must be longer than 45 pips from last touch with Ema8, and then a retracement touching Ema8 will fill our limit order and join the trend.

Fixed Stop ploss and target pprofit give us unreal vision of the strategy in the backtest. However I’ll keep trading it since is profitable for me since March, not as good as backtest results shows, of course… but very interesting… 😉

Why not?

CODE

defparam cumulateorders=false
defparam preloadbars=8
defparam flatbefore=090000
defparam flatafter=213000

mycompra, myventa = CALL "ALEX ATB Indicator"
ema=ExponentialAverage[8](close)
advance=abs(round(ema-ema[1]))
mylot=(((Strategyprofit+3000)*0.02)/30)

if not longonmarket and mycompra=1 then
BuyPrice = ema+advance
buy mylot contract at BuyPrice limit
endif
if not shortonmarket and myventa=-1 then
SellPrice = ema-advance
sellshort mylot contract at sellprice limit
endif

set stop ploss 30
set target pprofit 25

Best trading ever, Adolfo.

Download
Filename: ALEX-ATB-Bot-Dax.itf
Downloads: 1081
Adolfo
Adolfo Senior
A ProRealTrader. I'm here to learn as much as I can, and improve my skills every single day!
Author’s Profile

Comments

dreif123
9 years ago
#

hi Adolfo,

is Alex Auto Trading Botindex working on DAX as well ?

if so , can you post the full code? thx for the support  !

brosly
9 years ago
#

Good afternoon I am trying to get the complete code of lex strategy made by adolfo since I see here does not work for me. I thank you in advance.

Buenas tardes estoy intentando conseguir el codigo completo de la estrategia de lex realizada por adolfo ya que veo por aqui no me funciona. Os doy las gracias de antemano.

 

#

this strategy works only in a well defined trend

AleX
10 years ago
#

0 improvments, I tried a lot of modified version but no one was working. I think that only with a martingala this system can be good with a lot of risk. 

finplus
10 years ago
#

Bonsoir, j'ai de nouveau aujourd'hui lancé la stratégie en réel sur mon compte IG sur la paire AUD USD time frame 1 heure. Aucune position de prise. Pourtant je viens de backtester la stratégie et là deux opérations ont été effectuées (un long et un court). Je ne comprends pas ce qui se passe.

finplus
10 years ago
#

Bonjour, j'ai retesté hier sur la paire AUD/USD timeframe 1 heure sur mon compte réel chez IG: aucune position n'a été prise. Pourtant, ce matin, en effectuant un back test, le résultat indique qu'une position longue a été initiée à 17h puis clôturée sur la même heure avec un gain de 26 pips. Même constat qu'un de mes posts précédents. je ne sais pas à quoi cela est dû. Dommage car en back test, les résultats sont excellents. Si j'ai un peu de temps, je vais essayer de décortiquer la stratégie "pas à pas". Bonne journée.

morgan89
10 years ago
#

Bonjour,

Quelqu'un a-t-il réussi a avoir de bons résultats avec cette stratégie en backtestant en tick par tick ?

Si oui, sur quelle unité de temps avec quel support (Dax, Cac, Forex, ...) ?

Merci

CN
CN
10 years ago
#

Anyone got a correct code for the setup?
Used Minihax code with mixed results... Anyone that can vouch for a setup that works live fairly good?

/CN

finplus
10 years ago
#

The backtest of the code works perfectly with 1 hour timeframe.

finplus
10 years ago
#

Hi Wanjpt, I tried once only on AUD / USD in november 2016 during one day. No position has been taken on my live account (IG). The issue is that when I came back home, I have backtested the strategy and one position has been taken. I do not understand this difference.

wanjpt
10 years ago
#

Hi Finplus is your live account working out ok?

wanjpt
10 years ago
#

Hi Alco,

Sorry for late reply, I had error message and tried  the objectivo on 45, 39 and 40 but still having the error..wonder if there is anyone who has found  a way to resolve this.

wanjpt
10 years ago
#

hi, thanks Adolfo for this code.. is there anyone who has been trading this live? I started this week after few adjustment .. will let you guys know how it goes..

Alco
10 years ago
#

Hi wanjpt,

I did a lot of backtests with different tf's but when you look at the "0" bars it is not reliable enough. Did you make some adjustements to avoid 0 bars?

DonDollar
10 years ago
#

@joshali,

I tested the system with the 10.3 and the tick mode in the 3h timeframe for the DAX30 and the result was...I lost 2,45% and a win ratio of 0,8. I tested with the maximum of the 500 units you can use. 

@Nicolas: could you please run the same test with the same settings to see if there is something wrong.

BTW: without tick-by-tick it would be marvelous !!!

Joachim Nilsson
10 years ago
#

... and maybe this code adjusted for 5m in 5m timeframe?

defparam cumulateorders=false
defparam preloadbars=8
defparam flatbefore=090000
defparam flatafter=213000

mycompra, myventa = CALL "ALEX ATB Indicator"
ema=ExponentialAverage[24](close)
advance=abs(round(ema-ema[3]))
mylot= 1
//(((Strategyprofit+3000)*0.02)/30)

if not longonmarket and Momentum[10](close)>0 and mycompra=1 then
BuyPrice = ema+advance
buy mylot contract at BuyPrice limit
endif

if not shortonmarket and Momentum[10](close)<0 and myventa=-1 then
SellPrice = ema-advance
sellshort mylot contract at sellprice limit

endif
set stop ploss 40
set target pprofit 25

 

Joachim Nilsson
10 years ago
#

Hey! 

Would you be able to test in the 15m timeframe?

Alco
10 years ago
#

Am I the only one who is getting the best backtest results with 30min tf?

joshali
10 years ago
#

thanks for your reply Finplus. 

i was back testing this code below on 3 hour chart and results are very good. 

i checked the correction that you have sent but it looks same. 

please advice any error on this. 

 

defparam cumulateorders=false
defparam preloadbars=1000
defparam flatbefore=065500
defparam flatafter=211450

ema = Exponentialaverage[ts1](close)
once uma=Highest[ts1](high)
once umb=Lowest[ts1](low)
objetivo=40*pipsize
ts1=9

if High > ema and Low < ema then // Touching Ema8
tb = BarIndex
ltp = ema
uma = ema
umb = ema
endif

if low>ema then // New bullish movement
n = BarIndex - tb
uma=Highest[n](high)
umb=ema
endif

if high<ema then // New bearish movement
m = BarIndex - tb
umb=Lowest[m](low)
uma=ema
endif

if (uma-ltp)>objetivo and uma>ema then // buy condition
mycompra=1
endif
if (uma-ltp)<=objetivo then
mycompra=0
endif

if (ltp-umb)>objetivo and umb<ema then // short condition
myventa=-1
endif
if (ltp-umb)<=objetivo then
myventa=0
endif

advance=abs(round(ema-ema[1]))
mylot=(((Strategyprofit+3000)*0.02)/30)

if not longonmarket and mycompra=1 then
BuyPrice = ema+advance
buy mylot contract at BuyPrice limit
endif

if not shortonmarket and myventa=-1 then
SellPrice = ema-advance
sellshort mylot contract at sellprice limit
endif

set stop ploss 25
set target pprofit 13

finplus
10 years ago
#

Hi Joshali,

set your parameters as indicated below :

 

ts1=9

ema = Exponentialaverage[ts1](close)
once uma=Highest[ts1](high)
once umb=Lowest[ts1](low)
objetivo=39*pipsize

Like this, it is ok.

 

joshali
10 years ago
#

Hi 

can anyone please help me to correct this code as 

after getting very good results on back testing i tried with real money but my system was stopped and got error. 

This system was stopped because the program used a negative or zero (ex:close[-10]) during the evalution of the last candlestick. please add protections to your code to prevent negative or zero offsets. 

what changes i should made. 

finplus
10 years ago
#

Pourtant, en back test, les résultats sont excellents. Donc, je pense que le code a un potentiel mais nécessite toutefois quelques réglages. Mais je n'ai pas le temps de m'y coller. Peut-être son créateur...

Master_Code
10 years ago
#

Pour répondre à Nicolas, d'il y a 2 jours, j'ai dû testé sur le contrat Futur, avec et sans le mode tic by tic. 

Master_Code
10 years ago
#

Moi, ce type de situation m'arrive très souvent, mais en pire, c'est-à-dire que je suis en perte dans le trading réel, et en gain dans le backtest. Je peux faire un retour d'expérience sur le réalisé manqué si cela intéresse quelqu'un.

finplus
10 years ago
#

J'ai testé la semaine dernière sur la paire AUD/USD durant une journée en réel sur IG. Résultat : aucune position prise durant la journée. or, le soir, j'ai fait tourné en back test et là j'avais une position prise à 11h avec un gain à la clé. 

Master_Code
10 years ago
#

Je ne comprends pas. Le backtest est très mauvais avec l'option tick by tick

Quelqu'un peut m'expliquer ?

Oui, j'ai testé en réel. Je suis à 18% de performance depuis 3 mois.

Merci

Nicolas
10 years ago
#

Il n'y a pas de CFDs disponible chez prorealtime.com

Nicolas
10 years ago
#

Sûrement que la comparaison contrat CFD et contrat Futures est difficile à faire :) , compare les instruments, ce ne sont pas les mêmes !

Master_Code
10 years ago
#

En fait, la comparaison est faite toute choses égales par ailleurs. C'est-à-dire que en restant sur le même produit CFD ou contrat Futur, je fais tourner le backtest sans le tic by tic puis avec le tic by tic. Les résultats avec le tic by tic est si mauvais, qu'il en est inquiétant. Heureusement, en réel, je suis tout de même gagnant.

mbaker15
10 years ago
#

Has anyone been running this strategy in live mode? What are the results?

 

Mark

ProRealCode ProRealCode
Loading...