la fonction “coloured ” doit etre remplacer par “ENDIF”

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #208755 quote
    FXtonio
    Participant
    New

    Bonjour à tous

    j’ai un problème avec ce code:

    MMS5=Average[2]
    MMS35=Average[35]
    condition1= MMS5 crosses over MMS35
    condition2= MMS35 crosses over MMS5
    IF condition1 THEN
    ACHAT1 = 1
    else
    ACHAT1 = 0
    ENDIF
    IF condition2 THEN
    VENTE1 = -1
    ELSE
    vente1 = 0
    ENDIF
    if ACHAT1<>0 then
    drawarrowup(barindex,low-averagetruerange[14]*1.5)
    coloured(255,215,0)
    elsif vente1<>0 then
    drawarrowdown(barindex,high+averagetruerange[14]*1.5)
    coloured(255,0,255)
    endif
    return// ACHAT1 as "ACHAT1", VENTE1 as "VENTE1",0

     

    Sur pro real time ils me disent que la fonction “coloured ” doit etre remplacer par “ENDIF”

    Quelqu’un saurait comment faire svp? le code ne doit pas etre changer pour que l’indicateur fonctionne.

    #208757 quote
    Nicolas
    Keymaster
    Master

    Le code n’est pas correct, sans doute à cause d’un mauvais copier/coller, l’instruction COLOURED doit se trouver à la suite des instructions graphiques aux lignes 16 et 19, soit comme ceci:

    MMS5=Average[2]
    MMS35=Average[35]
    condition1= MMS5 crosses over MMS35
    condition2= MMS35 crosses over MMS5
    IF condition1 THEN
    ACHAT1 = 1
    else
    ACHAT1 = 0
    ENDIF
    IF condition2 THEN
    VENTE1 = -1
    ELSE
    vente1 = 0
    ENDIF
    if ACHAT1<>0 then
    drawarrowup(barindex,low-averagetruerange[14]*1.5)coloured(255,215,0)
    elsif vente1<>0 then
    drawarrowdown(barindex,high+averagetruerange[14]*1.5)coloured(255,0,255)
    endif
    return// ACHAT1 as "ACHAT1", VENTE1 as "VENTE1",0
    FXtonio thanked this post
    #208760 quote
    FXtonio
    Participant
    New

    Merci ,

    problème réglé 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

la fonction “coloured ” doit etre remplacer par “ENDIF”


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
FXtonio @fxtonio Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by FXtonio
3 years, 1 month ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/30/2023
Status: Active
Attachments: No files
Logo Logo
Loading...