Bonjour à tous !
Je viens ici pour la première fois afin de solliciter votre aide sur la création d’un code qui viendrait compléter ma stratégie.
Voici les paramètres que j’aimerais enter :
=> Analyse des derniers plus hauts / plus bas sur du 15min ( 20 dernières périodes)
=> Cassure du dernier plus haut / bas du M15 et analysé en M1 de plus de 0,10% (impulsion / accélération)
=> Prise de position automatique sur un retour du niveau de cassure (la prise de position se fait sur un reflux juste après la cassure sur UT M1)
=> Stop à 30 points max 1% du capital / TP à 150 points
Je ne sais pas si j’ai été totalement clair dans mes explications, si besoin de précision n’hésitez pas !
Merci encore pour votre aide et j’espère que la communauté pourra m’accompagner dans ce premier post 🙂
Bonne journée !
Voilà:
Timeframe(default)
ONCE Capital = 10000
ONCE TP = 100 * PipSize
ONCE SL = min(30 * PipSize,Capital * 0.01)
//
Timeframe(15mn,UpdateOnClose)
ONCE Periods = 20
HH = highest[Periods](high)
LL = lowest[Periods](low)
//
Timeframe(1mn,UpdateOnClose)
ONCE BreakOutL = 0
ONCE BreakOutS = 0
IF OnMarket THEN
EntryL = 0
EntryS = 0
BreakOutS = 0
BreakOutL = 0
ENDIF
IF (BreakOutL = 0) OR (HH <> HH[1]) THEN
BreakOutL = close CROSSES OVER HH[1]
IF BreakOutL THEN
EntryL = HH[1]
BreakOutS = 0
EntryS = 0
ENDIF
ENDIF
IF (BreakOutS = 0) OR (LL <> LL[1]) THEN
BreakOutS = close CROSSES UNDER LL[1]
IF BreakOutS THEN
EntryS = LL[1]
BreakOutL = 0
EntryL = 0
ENDIF
ENDIF
//
Timeframe(default)
IF EntryL AND Not OnMarket THEN
BUY 1 CONTRACT AT EntryL LIMIT
SET TARGET PROFIT TP
SET STOP LOSS SL
ENDIF
IF EntryS AND Not OnMarket THEN
SELLSHORT 1 CONTRACT AT EntryS LIMIT
SET TARGET PROFIT TP
SET STOP LOSS SL
ENDIF
//
//graphonprice HH
//graphonprice LL
//graphonprice EntryL coloured(0,0,255,255)
//graphonprice EntryS coloured(255,0,0,255)