Forums › ProRealTime forum Français › Support ProOrder › prise de position au dépassement de la Mèche › Reply To: prise de position au dépassement de la Mèche
10/15/2019 at 6:39 PM
#110263
dans un 1er temps je tiens à vous dire que le code fonction très bien sur probactest mais que des que je l’active sur proorder il ne sort plus de positon. merci
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
defparam cumulateorders=false DEFPARAM FLATBEFORE = 090000 DEFPARAM FLATAFTER = 173000 Tenkansen=0 Kijunsen=0 Sspa=0 Sspb=0 l=1 // Money Management SET TARGET pPROFIT 20 SET STOP pLOSS 10 startBreakeven = 10 PointsToKeep = 0 // ICHIMOKU Tenkansen = (highest[9](high)+lowest[9](low))/2 Kijunsen = (highest[26](high)+lowest[26](low))/2 SspA = (Tenkansen[26]+Kijunsen[26])/2 SspB = (highest[52](high[26])+lowest[52](low[26]))/2 // Achat a1 = close[5] < sspa or close[5] < sspb a2 = close CROSSES OVER kijunsen and close > sspa and close > sspb a3 = close CROSSES OVER sspa and close > kijunsen and close > sspb a4 = close CROSSES OVER sspb and close > sspa and close > kijunsen for a = 0 to 5 do if close[a] > kijunsen[a] and close[a] > sspa[a] and close[a] > sspb[a] then testea = 1 else testea = 0 endif IF testea = 1 and a1 and a2 or a3 or a4 THEN BUY l CONTRACTS AT high+0.2*pointsize stop endif next // vente v1 = close[5] > sspa or close[5] > sspb v2 = close CROSSES under kijunsen and close < sspa and close < sspb v3 = close CROSSES under sspa and close < kijunsen and close < sspb v4 = close CROSSES under sspb and close < sspa and close < kijunsen for v = 0 to 5 do if close[v] < kijunsen[v] and close[v] < sspa[v] and close[v] < sspb[v] then testev = 1 else testev = 0 endif IF testev = 1 and v1 and v2 or v3 or v4 THEN SELLSHORT l CONTRACTS AT low-0.2*pointsize stop endif next // fermeture achat fa1 = close[1] > close fa2 = close < kijunsen for x = 0 to 5 do if close[x] crosses under kijunsen[x]then testefa = 1 else testefa = 0 endif if testefa = 1 and fa1 and fa2 then sell AT low-0.2*pointsize stop ENDIF next // fermeture vente fv1 = close[1] < close fv2 = close > kijunsen for c = 0 to 5 do if close[c] crosses over kijunsen[c]then testefa = 1 else testefa = 0 endif if testefa = 1 and fv1 and fv2 then exitshort AT high+0.2*pointsize stop ENDIF next // remise à zero breakeven IF NOT ONMARKET THEN breakevenLevel=0 ENDIF // breakeven IF LONGONMARKET AND close-tradeprice(1)>=startBreakeven*pipsize THEN breakevenLevel = tradeprice(1)+PointsToKeep*pipsize ENDIF IF breakevenLevel>0 THEN SELL AT breakevenLevel STOP ENDIF IF SHORTONMARKET AND tradeprice(1)-close>=startBreakeven*pipsize THEN breakevenLevel = tradeprice(1)-PointsToKeep*pipsize ENDIF IF breakevenLevel>0 THEN EXITSHORT AT breakevenLevel STOP ENDIF |