Ci-dessous une demande qui a été envoyée à ProRealTime :
Demande pour un systeme en trading auto
Ouverture à 9h et fermeture à 18h
CONDITION ACHAT
à l’ouverture de la 2eme bougie DMI + MACD Haussier
CONDITION VENTE
à l’ouverture de la 2eme bougie DMI + MACD Baissier
STOP à 40 points
Target à 20 points
Et une proposition de réponse :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
DefParam CumulateOrders = False DefParam FlatBefore = 090000 DefParam FlatAfter = 180000 SD = STD[5](Close) ASD = Average[10](SD) dmi = ROUND(14 / (SD/ASD)) m = MACDline[12,26,9](Close) s = m - MACD[12,26,9](Close) buySignal = (dmi > dmi[1]) and (m > m[1]) sellSignal = (dmi < dmi[1]) and (m < m[1]) If LongOnMarket and m Crosses Under s then Sell At Market Elsif ShortOnMarket and m Crosses Over s then ExitShort At Market Endif If buySignal[1] then Buy 1 Contract At Market Elsif sellSignal[1] then SellShort 1 Contract At Market Endif Set Stop PLoss 40 Set target pprofit 20 |
1 user thanked author for this post.