Calculs non réalisés au sein d’un boucle

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #231374 quote
    Stef1618
    Participant
    Average

    Bonjour,

    Dans la boucle suivante les 5 premières variables sont bien calculées. En revanche, les variables $sortielg[i] et $sortiesh[i] encadrées par une condition IF restent désespérément à 0.

    J’ai graphé toutes les autres variables et elles sont OK .

    Savez-vous pourquoi ces 2 variables ne sont pas calculées?

    Merci,

    for i = 1 to 10 do
    // Position 1
    $RSIrange[i] = $CalcH[i] - $CalcL[i]
    $limitlg[i] = $CalcH[i]
    $limitsh[i] = $CalcL[i]
    $SLlg[i] = $limitlg[i] - SL
    $SLsh[i] = $limitsh[i] + SL
    
    if $RSIrange[i] <= rangesize then
    $sortielg[i] = $limitsh[i]
    $sortiesh[i] = $limitlg[i]
    elsif RSIrange[i] > rangesize then
    $sortielg[i] = $SLlg[i]
    $sortiesh[i] = $SLsh[i]
    endif
    next
    #231375 quote
    druby
    Participant
    New

    Salut…
    À première vue, les conditions ‘IF’ ‘ELSE’ couvrent toutes les variations possibles avec <= et >. Je m’attendrais donc à des résultats.

    En regardant de plus près, si ‘elsif RSIrange[i] ….’ est une variable de tableau, le ‘$’ est-il manquant !

    Druby

    Stef1618 thanked this post
    #231380 quote
    Stef1618
    Participant
    Average

    Salut Druby,

    Oui exactement le $ est manquant, quel idiot. Le code entier comporte beaucoup de variables avec des $ que celui-là m’a échappé…

    Je vais tout vérifier car j’ai détecté d’autres erreurs dans cette boucle.

    Merci

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

Calculs non réalisés au sein d’un boucle


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
Stef1618 @stef1618 Participant
Summary

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

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 04/10/2024
Status: Active
Attachments: No files
Logo Logo
Loading...