ProRealTime
Un Forum pour discuter des méthodes de trading que nous utilisons, de nos recherches...

Re: Turtles trading

par plataxis » 29 déc. 2015 22:20

C'est pas encore ça mais ça s'arrange. Je comprends pas pourquoi je plafonne à 3 positions... :?
Spoiler:

Code : #

REM defining the donchian channels
LongEntryCurrent = Highest [20] (high)
LongExitCurrent = lowest [10] (low)
ATR = AverageTrueRange[20]


pyramidage = ATR/2
breakout =0.1
longentry = (LongEntryCurrent[1] + breakout)
longexit = LongExitCurrent[1] - breakout
ncontracts = 1

if not longonmarket then
longposition1 = LongEntry
longposition2 = longposition1+pyramidage
longposition3 = longposition2 + pyramidage
longposition4 = longposition3 + pyramidage
BUY ncontracts contracts at longposition1 Stop
BUY ncontracts contracts at longposition2 Stop
BUY ncontracts contracts at longposition3 Stop
BUY ncontracts contracts at longposition4 Stop
SET STOP LOSS (ATR*2)
endif

if longonmarket then
sell at longexit stop
endif

GRAPH longexit COLOURED (255,0,0) AS "longexit"
GRAPH longposition1 COLOURED (0,255,0) AS "longposition1"
GRAPH longposition2 COLOURED (0,0,255) AS "longposition2"
GRAPH longposition3 COLOURED (255,0,255) AS "longposition3"
GRAPH longposition4 COLOURED (255,100,255) AS "longposition4"
//GRAPH stoplong COLOURED (0,100,100) AS "longcount"

Re: Turtles trading

par plataxis » 30 déc. 2015 10:05

Ca y est : en fait je ne prenais position (1 2 ou 3) que lors d'un break out, pas lorsque la tendance se poursuivait (donc pas de 4eme position).

Là je crois avoir réussi, mais comme c'est perdant pour les achats en période haussière, je suppose que c'est une mauvaise idée sur indice (que les turtles ne tradaient pas).

Code : #

REM defining the donchian channels
LongEntryCurrent = Highest [20] (high)
LongExitCurrent = lowest [10] (low)
ATR = AverageTrueRange[20]


pyramidage = ATR/2
breakout =0.1
longentry = (LongEntryCurrent[1] + breakout)
longexit = LongExitCurrent[1]
ncontracts = 1

if not longonmarket then
longposition1 = LongEntry
longposition2 = longposition1+pyramidage
longposition3 = longposition2 + pyramidage
longposition4 = longposition3 + pyramidage
endif
If COUNTOFLONGSHARES < (ncontracts * 1) then
BUY ncontracts contracts at longposition1 Stop
endif
If COUNTOFLONGSHARES < (ncontracts * 2) then
BUY ncontracts contracts at longposition2 Stop
endif
If COUNTOFLONGSHARES < (ncontracts * 3) then
BUY ncontracts contracts at longposition3 Stop
endif
If COUNTOFLONGSHARES < (ncontracts * 4) then
BUY ncontracts contracts at longposition4 Stop
endif



SET STOP LOSS (ATR*2)

if longonmarket then
sell at longexit stop
endif

GRAPH longexit COLOURED (255,0,0) AS "longexit"
GRAPH longposition1 COLOURED (0,255,50) AS "longposition1"
GRAPH longposition2 COLOURED (0,50,255) AS "longposition2"
GRAPH longposition3 COLOURED (255,0,255) AS "longposition3"
GRAPH longposition4 COLOURED (255,100,255) AS "longposition4"

Re: Turtles trading

par leroidessables » 30 déc. 2015 10:19

Tu es sûr que le backtest se déroule comme en condition réel? Sinon en effet, peut être est-ce une question d'actif, ou alors une question d'époque, et là on ne peut plus faire grand chose...

Re: Turtles trading

par ladefense92800 » 30 déc. 2015 10:21

merci pour l effort ...

Re: Turtles trading

par plataxis » 30 déc. 2015 15:17

Il faut croire que le CAC n'est pas si directionnel que ça...
Screen Shot 12-30-15 at 03.15 PM.PNG
Screen Shot 12-30-15 at 03.15 PM.PNG (129.06 Kio) Vu 685 fois
Spoiler:

Code : #

REM defining the donchian channels
slow = 20
fast = 10
LongEntryCurrent = Highest [slow] (high)
LongExitCurrent = lowest [fast] (low)
shortentrycurrent = lowest [slow] (low)
shortexitcurrent = highest  [fast] (high)


ATR = AverageTrueRange[20]


pyramidage = ATR/2
breakout = 0.1
longentry = (LongEntryCurrent[1] + breakout)
longexit = LongExitCurrent[1]
shortentry = (shortentrycurrent[1] - breakout)
shortexit = shortexitcurrent [1]


ncontracts = 1

if not longonmarket then
longposition1 = LongEntry
longposition2 = longposition1+pyramidage
longposition3 = longposition2 + pyramidage
longposition4 = longposition3 + pyramidage
endif
If COUNTOFLONGSHARES < (ncontracts * 1) then
BUY ncontracts contracts at longposition1 Stop
endif
If COUNTOFLONGSHARES < (ncontracts * 2) then
BUY ncontracts contracts at longposition2 Stop
endif
If COUNTOFLONGSHARES < (ncontracts * 3) then
BUY ncontracts contracts at longposition3 Stop
endif
If COUNTOFLONGSHARES < (ncontracts * 4) then
BUY ncontracts contracts at longposition4 Stop
endif
if longonmarket then
sell at longexit stop
endif

if not shortonmarket then
shortposition1 = shortentry
shortposition2 = shortposition1 - pyramidage
shortposition3 = shortposition2 - pyramidage
shortposition4 = shortposition3 - pyramidage
endif
If COUNTOFSHORTSHARES < (ncontracts * 1) then
SELLSHORT ncontracts contracts at shortposition1 Stop
endif
If COUNTOFSHORTSHARES < (ncontracts * 2) then
SELLSHORT ncontracts contracts at shortposition2 Stop
endif
If COUNTOFSHORTSHARES < (ncontracts * 3) then
SELLSHORT ncontracts contracts at shortposition3 Stop
endif
If COUNTOFSHORTSHARES < (ncontracts * 4) then
SELLSHORT ncontracts contracts at shortposition4 Stop
endif

if shortonmarket then
exitshort at shortexit stop
endif



SET STOP LOSS (pyramidage * 4)


GRAPH longexit COLOURED (255,0,0) AS "longexit"
GRAPH longposition1 COLOURED (0,255,50) AS "longposition1"
GRAPH shortexit COLOURED (0,50,255) AS "shortexit"
GRAPH shortposition1 COLOURED (255,0,255) AS "shortposition1"



Re: Turtles trading

par plataxis » 30 déc. 2015 15:32

leroidessables a écrit :Tu es sûr que le backtest se déroule comme en condition réel? Sinon en effet, peut être est-ce une question d'actif, ou alors une question d'époque, et là on ne peut plus faire grand chose...
Je n'ai aucune certitude si ce n'est que les backtests sont généralement plus favorables que les conditions réelles. Concernant l'époque, je n'ai pas les archives, mais concernant les actifs, je ne trouve pas d'actif permettant de gagner avec cette stratégie.

Re: Turtles trading

par Mister Hyde » 31 déc. 2015 18:24

As-tu testé avec les sous-jacents que tradaient les tortues ?

Re: Turtles trading

par ladefense92800 » 31 déc. 2015 18:59

Si ça marchait avant pourquoi ça marche plus .....

une Bougie est une Bougie ....

Re: Turtles trading

par plataxis » 31 déc. 2015 23:12

Mister Hyde a écrit :As-tu testé avec les sous-jacents que tradaient les tortues ?
Je n'ai pas tout testé, mais bon, je suis en même temps modérément surpris : les marchés évoluent, comme tu l'écrivais ailleurs les momentum de plusieurs jours se limitent maintenant à quelques heures... beaucoup plus d'intervenants, des "super opérateurs" à la pelle, des produits dérivés représentant l'essentiel de l'argent mondial... Tout ça crée une complexité telle qu'il est probablement moins évident de rentrer de façon systématique pour un gain compensant les autres pertes. Mais bon, j'aurais quand même pensé être dans le vert... :?

Re: Turtles trading

par DarthTrader » 31 déc. 2015 23:25

New+Year+Turtle.JPG
New+Year+Turtle.JPG (226.05 Kio) Vu 651 fois

Re: Turtles trading

par Chouchou » 02 janv. 2016 12:37

Pour tester votre système, pourquoi ne pas le faire sur le compte demo?

Re: Turtles trading

par plataxis » 02 janv. 2016 14:42

Parce que je ne brûle pas les étapes :

Etape 1 : backtest
étape 2 : démo
étape 3 : live.

Sujets similaires
Day trading contre swing trading
par didier54 » 24 août 2014 17:02 (15 Réponses)
Projet création Salle de Trading - Trading Room
par jctrader » 20 sept. 2014 16:53 (21 Réponses)
Projet wireless light trading ;) le trading en lumière ;)
Fichier(s) joint(s) par DarkPoule » 21 mars 2015 15:22 (18 Réponses)
Optimal Trading Stops and Algorithmic Trading
par bobbyO » 21 nov. 2015 13:02 (8 Réponses)
Méthode de trading en swing trading sur le DAX
par Patouaul » 31 janv. 2016 00:44 (18 Réponses)
Trading actions US via PRT Trading
Fichier(s) joint(s) par Benoist Rousseau » 14 févr. 2017 22:18 (25 Réponses)
Journal de trading scalping day trading - Benoist Rousseau
Fichier(s) joint(s) par Delo » 04 mars 2018 20:25 (351 Réponses)
Analyse pour Le Day Trading et Le Swing Trading
par Amarantine » 03 janv. 2019 21:46 (2 Réponses)
Trading dax vs Trading dow
par Toto le Héros » 03 juin 2019 16:43 (6 Réponses)