Erreur de ¨PRT avec Buy/Sell sur indicateur
- This topic has 4 replies, 2 voices, and was last updated 2 years ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
Similar topics:
Forums › ProRealTime forum Français › Support ProBuilder › Erreur de ¨PRT avec Buy/Sell sur indicateur
Bonjour,
j’ai écrit un petit programme de cassure assez simple mais PRT me le refuse :
Erreur dans l’indicateur “! BO1430” : les ordres BUY/STOP ne sont autorisés que dans le cadre
des systèmes de trading
Mais il n’y a aucun ordre dans cet indicateur.
Si quelqu’un peut m’aider ?
Voici le programme:
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 |
//parameters : boxsize=0.4 debut=143000 //------------------------ Etablissement du renko ---------------- //repris de Nicloas once topprice = high once bottomprice = low - boxsize*ticksize if(high > topprice + boxsize) THEN topprice = high bottomprice = topprice - boxsize ELSIF (low < bottomprice - boxsize) THEN bottomprice = low topprice = bottomprice + boxsize ELSE topprice = topprice bottomprice = bottomprice ENDIF //------------------- Canal d'ouverture ------------------- once pH=high once PB=low once CA1=high once CA2=high once CA3=high once CV1=low once CV2=low once CV3=low once SSA1=high once SSA2=high once SSV1=low once SSV2=low if time<debut then cpt=0 PH=topprice PB=bottomprice SSA1=topprice SSA2=topprice SSV1=bottomprice SSV2=bottomprice elsif topprice<>topprice[1] then cpt=cpt+1 PH=max(PH,topprice) PB=min(PB,bottomprice) if high> CA3 then SSA1=max(SSA1,high-2*ecart) endif if high[1]<=CA3 and high>=CA3 then etat=3 endif if etat=3 and high[1]>=CA and high<CA1 then SSA2=max(tradeprice,high-2*ecart) endif if low<CV3 then SSV1=min(SSV1,low+2*ecart) endif if low[1]>=CV3 and low<=CV3 then etat=-3 endif if etat=-3 then SSV2=min(tradeprice,low+2*ecart) endif endif if cpt>5 then PH=PH[1] PB=PB[1] endif ecart=PH-PB CA1=PH+1*ecart CA2=PH+2*ecart CA3=pH+3*ecart CV1=PB-1*ecart CV2=PB-2*ecart CV3=PB-3*ecart if cpt>0 and cpt<6and cpt[1]<>cpt then drawtext("#cpt#",barindex+3,PH+.5,dialog,bold,12)coloured(0,0,0) endif if cpt=0 then CA1=high CA2=high CA3=high CV1=low CV2=low CV3=low endif RETURN topprice style(line,1)coloured(0,0,0) as "topbox", bottomprice style(line,1)coloured(0,0,0) as "bottombox",PH style(line,2)coloured(0,0,0) as "PH",PB style(line,2)coloured(0,0,0) as "PB",CA1 style(dottedline,2)coloured(0,90,0)as"CA1",CA2 style(dottedline,2)coloured(0,90,0)as"CA2",CA3 style(dottedline,2)coloured(0,90,0)as"CA3",CV1 style(dottedline,2)coloured(210,0,0)as"CV1",CV2 style(dottedline,2)coloured(210,0,0)as"CV2",CV3 style(dottedline,2)coloured(210,0,0)as"CV3",SSA1 style(line,1)coloured(255,0,0) as "stopSA1",SSV1 style(line,1)coloured(255,0,255)as"stopSV1",SSA2 style(dottedline,1)coloured(255,0,255) as"stopSA2",SSV2 style(dottedline,1)coloured(255,0,255) as "stopSV2" |
Bonsoir,
J’ai reformaté le code, on y voit l’usage du mot-clé tradeprice (lignes 56,65), qui dans probacktest/proorder récupère le niveau d’éxécution d’un ordre (d’où le message générique même si les mots buy ou sell ne sont pas dans le code). Tradeprice ne passe pas dans un code d’indicateur.
Ok, vu, lien en cas de futur lecteur tombant sur ce post via case “recherche” quand les 2 sujets ne seront plus en 1ère page: https://www.prorealcode.com/topic/sortie-de-tposition-refusee-sur-niveau/
Find exclusive trading pro-tools on