Comment afficher une portion d’une courbe
Forums › ProRealTime forum Français › Support ProBuilder › Comment afficher une portion d’une courbe
- This topic has 4 replies, 3 voices, and was last updated 3 years ago by RicLg.
-
-
06/30/2021 at 7:09 AM #172761
Bonjour,
Pour alléger le visuel, je souhaiterai afficher qu’une petite portion graphique des courbes calculées, à l’intérieur du rectangle.
Auriez-vous une solution à proposée?
Merci pour votre aide
Affichage tronqué des Mb12345678defparam DRAWONLASTBARONLY=True // requisdefparam calculateonlastbars=255 // requisMb5=Average[5](close)Mb10=Average[10](close)Mb15=Average[15](close)return Mb5 as "Moyenne Mobile_5",Mb10 as "Moyenne Mobile_10",Mb15 as "Moyenne Mobile_15"// return close as "My close"06/30/2021 at 8:41 AM #172770Dans ce cas il faut aller en arrière en dessinant tes courbes avec des DRAWSEGMENTS et en arrêtant au BARINDEX courant – X
Voir exemples (à adapter), mais c’est l’idée :
https://www.prorealcode.com/topic/add-multiple-moving-averages-in-one-go-to-a-chart/#post-52682
https://www.prorealcode.com/topic/shift-moving-average-to-the-left/#post-75511
06/30/2021 at 1:42 PM #172810Merci Nicolas pour la suggestion. Le codage n’est peut être pas convenable.
5 Mb dont chacune trace 10 segments , soit 50 instructions DrawSegment.
- Désolé pour le doublon de fichiers attachés, impossible d’en supprimer 1
Affichage tronque des courbes12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667Rem Affichage tronqué des courbesdefparam DRAWONLASTBARONLY=True // requisdefparam calculateonlastbars=255 // requisMb5=Average[5](close)Mb10=Average[10](close)Mb15=Average[15](close)Mb20=Average[20](close)Mb25=Average[25](close)DRAWSEGMENT(barindex-1, Mb5[1], barindex, Mb5)DRAWSEGMENT(barindex-2, Mb5[2], barindex-1, Mb5[1])DRAWSEGMENT(barindex-3, Mb5[3], barindex-2, Mb5[2])DRAWSEGMENT(barindex-4, Mb5[4], barindex-3, Mb5[3])DRAWSEGMENT(barindex-5, Mb5[5], barindex-4, Mb5[4])DRAWSEGMENT(barindex-6, Mb5[6], barindex-5, Mb5[5])DRAWSEGMENT(barindex-7, Mb5[7], barindex-6, Mb5[6])DRAWSEGMENT(barindex-8, Mb5[8], barindex-7, Mb5[7])DRAWSEGMENT(barindex-9, Mb5[9], barindex-8, Mb5[8])DRAWSEGMENT(barindex-10, Mb5[10], barindex-9, Mb5[9])DRAWSEGMENT(barindex-1, Mb10[1], barindex, Mb10)DRAWSEGMENT(barindex-2, Mb10[2], barindex-1, Mb10[1])DRAWSEGMENT(barindex-3, Mb10[3], barindex-2, Mb10[2])DRAWSEGMENT(barindex-4, Mb10[4], barindex-3, Mb10[3])DRAWSEGMENT(barindex-5, Mb10[5], barindex-4, Mb10[4])DRAWSEGMENT(barindex-6, Mb10[6], barindex-5, Mb10[5])DRAWSEGMENT(barindex-7, Mb10[7], barindex-6, Mb10[6])DRAWSEGMENT(barindex-8, Mb10[8], barindex-7, Mb10[7])DRAWSEGMENT(barindex-9, Mb10[9], barindex-8, Mb10[8])DRAWSEGMENT(barindex-10, Mb10[10], barindex-9, Mb10[9])DRAWSEGMENT(barindex-1, Mb15[1], barindex, Mb15)DRAWSEGMENT(barindex-2, Mb15[2], barindex-1, Mb15[1])DRAWSEGMENT(barindex-3, Mb15[3], barindex-2, Mb15[2])DRAWSEGMENT(barindex-4, Mb15[4], barindex-3, Mb15[3])DRAWSEGMENT(barindex-5, Mb15[5], barindex-4, Mb15[4])DRAWSEGMENT(barindex-6, Mb15[6], barindex-5, Mb15[5])DRAWSEGMENT(barindex-7, Mb15[7], barindex-6, Mb15[6])DRAWSEGMENT(barindex-8, Mb15[8], barindex-7, Mb15[7])DRAWSEGMENT(barindex-9, Mb15[9], barindex-8, Mb15[8])DRAWSEGMENT(barindex-10, Mb15[10], barindex-9, Mb15[9])DRAWSEGMENT(barindex-1, Mb20[1], barindex, Mb20)DRAWSEGMENT(barindex-2, Mb20[2], barindex-1, Mb20[1])DRAWSEGMENT(barindex-3, Mb20[3], barindex-2, Mb20[2])DRAWSEGMENT(barindex-4, Mb20[4], barindex-3, Mb20[3])DRAWSEGMENT(barindex-5, Mb20[5], barindex-4, Mb20[4])DRAWSEGMENT(barindex-6, Mb20[6], barindex-5, Mb20[5])DRAWSEGMENT(barindex-7, Mb20[7], barindex-6, Mb20[6])DRAWSEGMENT(barindex-8, Mb20[8], barindex-7, Mb20[7])DRAWSEGMENT(barindex-9, Mb20[9], barindex-8, Mb20[8])DRAWSEGMENT(barindex-10, Mb20[10], barindex-9, Mb20[9])DRAWSEGMENT(barindex-1, Mb25[1], barindex, Mb25)DRAWSEGMENT(barindex-2, Mb25[2], barindex-1, Mb25[1])DRAWSEGMENT(barindex-3, Mb25[3], barindex-2, Mb25[2])DRAWSEGMENT(barindex-4, Mb25[4], barindex-3, Mb25[3])DRAWSEGMENT(barindex-5, Mb25[5], barindex-4, Mb25[4])DRAWSEGMENT(barindex-6, Mb25[6], barindex-5, Mb25[5])DRAWSEGMENT(barindex-7, Mb25[7], barindex-6, Mb25[6])DRAWSEGMENT(barindex-8, Mb25[8], barindex-7, Mb25[7])DRAWSEGMENT(barindex-9, Mb25[9], barindex-8, Mb25[8])DRAWSEGMENT(barindex-10, Mb25[10], barindex-9, Mb25[9])return06/30/2021 at 1:56 PM #172814Vous pouvez réduire les lignes comme ceci:
12345678910111213141516171819Rem Affichage tronqué des courbesdefparam DRAWONLASTBARONLY=True // requisdefparam calculateonlastbars=255 // requisN = 10Mb5=Average[5](close)Mb10=Average[10](close)Mb15=Average[15](close)Mb20=Average[20](close)Mb25=Average[25](close)FOR i = 1 TO Nx = i - 1DRAWSEGMENT(barindex-i, Mb5[i], barindex-x, Mb5[x])DRAWSEGMENT(barindex-i, Mb10[i], barindex-x, Mb10[x])DRAWSEGMENT(barindex-i, Mb15[i], barindex-x, Mb15[x])DRAWSEGMENT(barindex-i, Mb20[i], barindex-x, Mb20[x])DRAWSEGMENT(barindex-i, Mb25[i], barindex-x, Mb25[x])NEXTreturn06/30/2021 at 2:56 PM #172818 -
AuthorPosts
Find exclusive trading pro-tools on