Bug fonction drawarrow / Up

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #135414 quote
    GilInvest
    Participant
    Average

    Bonjour à tous, ProBuilder refuse mes lignes 17 et 36 (DRAWARROWDOWN et DRAWARROWUP, dans les structures conditionnelles portant sur les engulfing, sont soulignées indiquant un bug. Voir PJ). Je n’arrive pas a comprendre. Ca viendrait y pas du fait qu’il y aurait conflit avec 2 autres instructions incluant ces mêmes fonctions ? Par avance merci pour vos lumières. PS : dans la fenêtre de dialogue il y a “erreur de synthaxe ligne 17, caractere 88. Une des expressions suivantes serait plus appropriées que DRAWARROWdown” : “\n” . Je ne vois pas du tout a quoi correspondarit ce ” \n ”

    atr10=averagetruerange[10]
     
    once Breakupsignal = 0
    once Breakdownsignal = 0
    once engulfing = 0
    
    If close>exponentialaverage[100] and open[0]<ExponentialAverage[7] and open[0]<ExponentialAverage[20] and high[0]>ExponentialAverage[7] and high[0]>ExponentialAverage[20] and close[0]>open[0] then
    DRAWARROWUP(barindex[0],low-atr10/2) coloured(0,200,0)
    Breakupsignal =1
    
    else
    
    Breakupsignal =0
    
    endif
    
    If close>exponentialaverage[100] and close<open and close<low[1] and open>high[1] then DRAWARROWdown(barindex[0],low-atr10/2) coloured(255,165,0)
    engulfing=1
    
    else
    
    engulfing=0
    
    endif
    
    If close<exponentialaverage[100] and open[0]>ExponentialAverage[7] and open[0]>ExponentialAverage[20] and high[0]<ExponentialAverage[7] and high[0]<ExponentialAverage[20] and close[0]<open[0] then
    DRAWARROWdown (barindex[0],low-atr10/2) coloured(200,0,0)
    Breakdownsignal =-1
    
    else
    
    Breakdownsignal =0
    
    endif
    
    If close<exponentialaverage[100] and close>open and close>low[1] and open<high[1] then DRAWARROWUP(barindex[0],low-atr10/2) coloured(255,165,0)
    engulfing =-1
    
    else
    
    engulfing =0
    
    endif
    
    return Breakupsignal coloured(120,210,120) style(histogram), Breakdownsignal coloured(210,120,120) style(histogram), engulfing coloured(255,165,0) style(histogram), 0 as "0"
    200610-Bug-code-Break.jpg 200610-Bug-code-Break.jpg
    #135416 quote
    robertogozzi
    Moderator
    Master

    APRÈS le mot-clé “THEN” il ne doit rien y avoir, vous devrez commencer une nouvelle ligne.

    GilInvest thanked this post
    #135420 quote
    Nicolas
    Keymaster
    Master

    Voir formation sur les structures conditionnelles : https://www.prorealcode.com/chapter/tests-simples-avec-if-endif/

    GilInvest thanked this post
    #135426 quote
    GilInvest
    Participant
    Average

    Humm, merci. J’ai justement fait cette leçon ce week end et ai voulu appliquer. Je vais regarder à nouveau.

    #135433 quote
    GilInvest
    Participant
    Average

    Well, j’ai regardé à nouveau; ai comparé / revu mon code > de mon point de vue, j’ai respecté toutes les conditions expliquées.  Je n’ai pas mis de structures imbriquée. J’ai mis les blocs conditionnels, les uns après les autres incluant chacun les instructions IF / THEN / ENDIF. Bref, je ne vois pas ou se situe le bug. Si tu peux m’éclairer, je suis preneur. Merci

    #135436 quote
    robertogozzi
    Moderator
    Master
    IF Condition THEN
      xyz
      .
    ENDIF

    pas

    IF Condition THEN xyz
     .
     .
    ENDIF
    #135448 quote
    GilInvest
    Participant
    Average

    Wow thanks Extremely subtle. I bet I could find out this detail. Thank you so much.

    Ouah merci. Extrêmement subtil. Je parie que je pourrais découvrir ce détail. Merci beaucoup.

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

Bug fonction drawarrow / Up


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
GilInvest @gilinvest Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by GilInvest
5 years, 9 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 06/10/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...