AutoTrading Bot qui plante Help!

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

    Hello,

    J’aurai besoin de votre aide please. J’ai un robot sur bougie 10secondes qui plante avec le fameux message erreur division par 0.

    J’ai isolé la partie du code qui pose problème (car sans ce morceau, le robot ne bug plus. Il n’y a pas de division au passage dans ce morceau de code)

    Il s’agit de l’indicateur Andrea:

    /——————————————————————————
    //Settings
    //—————————————————————————–{
    lengthAndrea= 50 //defaut 50 et wf=50
    siglength = 9 //defaut 9 et wf=9

    //—————————————————————————–}
    //Exponential Envelopes
    //—————————————————————————–{

     

    alpha = 2/(lengthAndrea+1)

    C = close
    O = open

    if barindex=0 then
    up1 = C
    up2 = C * C
    dn1 = C
    dn2 = C * C
    else
    up1 = max(max(C, O), up1[1] – (up1[1] – C) * alpha)
    up2 = max(max(C * C, O * O), up2[1] – (up2[1] – C * C) * alpha)
    dn1 = min(min(C, O), dn1[1] + (C – dn1[1]) * alpha)
    dn2 = min(min(C * C, O * O), dn2[1] + (C * C – dn2[1]) * alpha)
    endif

    bull = sqrt(dn2 – dn1 * dn1)
    bear = sqrt(up2 – up1 * up1)

    maxi = max(bull, bear)
    signal = ExponentialAverage[siglength](maxi)

    J’ai essayé plusieurs choses sans succès. Si quelqu’un ici a une idée je suis preneur.

    Cdt,

    #237643 quote
    Iván González
    Moderator
    Master

    Bonjour, j'ai utilisé la partie du code que vous avez fourni et cela fonctionne correctement.

    2024-09-16_17-23.png 2024-09-16_17-23.png
    #237646 quote
    Philouxp
    Participant
    New

    Merci. Je ne vois pas en effet le problème sur ces lignes. Je vais regarder si le bug est bien lié à cette partie.

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

AutoTrading Bot qui plante Help!


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
Philouxp @philouxp Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Philouxp
1 year, 5 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 09/16/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...