Aide code DRAWARROWUP DRAWARROWDOWN

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24865 quote
    larouedegann
    Participant
    Master

    Bonjour,
    Je voudrais dessiner des flêches sur le graphique prix avec l’indicateur scalpe trade signal.
    Mais apparemment il doit y avoir quelque chose de faux dans ce que j’ai fait….
    Si quelqu”un peut m’aider merci

    
    
    
    
    
    
    
    
    once rr=1
    mb=average[20](typicalprice)
    k=48
    n=(k*2)-4
    p=(n/2)-1
    
    h1=DPO[n](high)
    
    moyh=high-h1
    hi=(moyh-moyh[1]+(high[p])/n)*n
    hi=(round(hi*100))/100
    l1=dpo[n](low)
    
    moyl=low-l1
    lo=(moyl-moyl[1]+(low[p])/n)*n
    lo=(round(lo*100))/100
    clo1=dpo[n](close)
    
    moyc=close-clo1
    clot=(moyc-moyc[1]+(close[p])/n)*n
    clot=(round(clot*100))/100
    cond1=(high>high[1] and high>high[2])
    cond2=(cond1 and high>hi[46]) and (barindex>bari or rr=-1)
    if cond1 and cond2 then
    flagg=1
    targeth=high
    targetl=lo[46]
    else
    flagg=0
    signa=mb
    endif
    for zz=0 to 45
    if clot[45-zz]<targetl and hi[45-zz]<=targeth and flagg=1  then
    signa=high+(averagetruerange[20](close))*.5
    rr=1
    bari=barindex+zz+2
    break
    elsif     hi[45-zz]>targeth then
    signa=mb
    break
    endif
    next
    condi=(low<low[1] and low<low[2]) and low<lo[46] and (barindex>bar or rr=1)
    if condi then
    fflag=1
    target1=low
    target2=hi[46]
    else
    fflag=0
    siigna=mb
    endif
    for kk=0 to 45
    if clot[45-kk]>target2 and lo[45-kk]>=target1 and fflag=1 then
    siigna=low-(averagetruerange[20](close))*.5
    rr=-1
    bar=barindex+kk+2
    break
    elsif lo[45-kk]<target1 then
    siigna=mb
    break
    endif
    next
    if barindex < 100 then
    signa=undefined
    siigna=undefined
    endif
    golong = (siigna < mb)
    goshort = (signa > mb)*-1
    
    IF GOLONG then DRAWARROWUP (BARINDEX[1],low[1]) coloured (0,255,0)
    elsif goshort then DRAWARROWDOWN (BARINDEX[1],high[1]) coloured (255,0,0)
    endif
    
    return golong as  "LONG" ,goshort as "SHORT",0
    
    #25060 quote
    JC_Bywan
    Moderator
    Master

    Bonjour, je n’ai pas regardé tout le code, mais si le problème ne concerne que le dessin des flèches, alors quelques commentaires:

    1. D’abord il serait étonnant que le code passe ainsi, il devrait donner des petits panneaux avertisseurs d’erreurs dans l’éditeur devant les lignes 78 et 79 pour avertir d’une faute, car il faudrait aller à la ligne après chaque “then”
      IF GOLONG then
         DRAWARROWUP (BARINDEX[1],low[1]) coloured (0,255,0)
      elsif goshort then
         DRAWARROWDOWN (BARINDEX[1],high[1]) coloured (255,0,0)
      endif
    2. Ensuite tout dépend de si l’on veut afficher les flèches dans la fenêtre de l’indicateur ainsi créé, ou dans la fenêtre des prix, car les flèches ne sont pas prises en compte pour dimensionner la fenêtre… Donc pour affichage dans une fenêtre indicateur séparée, les flèches seront très probablement hors cadre de la fenêtre car l’indicateur va juste afficher la zone 0 à 1 des variables golong, goshort de la ligne return

      Alors que pour affichage dans la fenêtre des prix (ce que tu indiques vouloir), là les flèches seront visibles puisque leur ordonnée serait high ou low de la bougie précédente (mais pourrait se superposer à la bougie en cours), dans ce cas inutile d’ajouter golong goshort et 0 à la ligne return car la zone 0-1 ne sera pas visible sur le graphe des prix selon l’instrument tradé. Après qu’il soit créé, il faudra juste ajouter l’indicateur via la petite clé dans le coin en haut à gauche de la fenêtre prix.

    #27258 quote
    RECALL
    Participant
    Junior

    Voici ton indicateur, et pour faire simple tu places une alerte achat et vente sur l’indicateur et tu auras les flèches ADHOC, en effet je n’ai pas réussi à placer les flèches ventes via draw.

    As-tu trouvé la solution pour intégrer le past dpo sur ce code ?

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

Aide code DRAWARROWUP DRAWARROWDOWN


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by RECALL
9 years ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 02/12/2017
Status: Active
Attachments: No files
Logo Logo
Loading...