Point pivot mensuel

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #111617 quote
    Lorenzodb22
    Participant
    Junior

    Bonjour,

    Dans mon programme j’ai besoin d’implémenter le point pivot mensuel or j’ai l’impression que c’est tout le temps le point pivot journalier qui est codé et lu…

    Voici la partie de code sur le point pivot :

    // pivot 
    cloture=DClose(1)
    pivotJ=(DHigh(1) + DLow(1) + DClose(1))/3
    if OpenDayOfWeek=1 then
    pivotJ=(DHigh(2) + DLow(2) + DClose(2))/3
    cloture=DClose(2)
    endif

    Merci de votre aide par avance

    #111656 quote
    Nicolas
    Keymaster
    Master

    Le code du point pivot mensuel (complet avec les supports et résistances), est celui-ci (comprend également les différents modes de calcul de celui-ci):

    mode = 0
    
    If Month<>Month[1] then
     monthlyHigh = Highest[BarIndex - lastMonthBarIndex](High)[1]
     monthlyLow = Lowest[BarIndex - lastMonthBarIndex](Low)[1]
     lastMonthBarIndex = BarIndex
     
     If mode = 0 then
      monthlyPivot = (monthlyHigh + monthlyLow + Close[1]) / 3
     Elsif mode = 1 then
      monthlyPivot = (Open + monthlyHigh + monthlyLow + Close[1]) / 4
     Elsif mode = 2 then
      monthlyPivot = (monthlyHigh + monthlyLow + Close[1]*2) / 4
     Else
      monthlyPivot = (Open*2 + monthlyHigh + monthlyLow) / 4
     Endif
     monthlyR1 = 2*monthlyPivot - monthlyLow
     monthlyS1 = 2*monthlyPivot - monthlyHigh
     monthlyR2 = monthlyPivot + (monthlyHigh - monthlyLow)
     monthlyS2 = monthlyPivot - (monthlyHigh - monthlyLow)
     monthlyR3 = monthlyR1 + (monthlyHigh - monthlyLow)
     monthlyS3 = monthlyS1 - (monthlyHigh - monthlyLow)
    Endif
    #111917 quote
    Lorenzodb22
    Participant
    Junior

    Merci pour votre réponse

    #141948 quote
    styrke
    Participant
    Average

    Bonjour Nicolas,

    Dans cette formule il me semble qu’il y a un problème:

    monthlyPivot = (monthlyHigh + monthlyLow + Close[1]) / 3

    Close[1] va retourner la clôture de la bougie n-1 de votre unité de temps où vous lancez votre programme.

    Or ici c’est pas ce que nous voulons: il nous faut en réalité la clôture du mois précédent.

    La définition sauf erreur est bien : Pivot M = Plus Haut du mois précédent + plus Bas du mois précédent + Clôture du mois précédent / 3

    #141983 quote
    Nicolas
    Keymaster
    Master

    En effet, mais puisque :

    Month<>Month[1]

    Alors la bougie courante est bien celle du nouveau mois et donc on peut utiliser la clôture de la précédente, puisque c’est bien celle de la fin du mois précédent 🙂

    #173967 quote
    thepenguin4
    Participant
    New

    Bonsoir, je suis désolé mais je ne comprends pas l’histoire des “différents modes”. À quoi cela sert-il ? Merci

    #173988 quote
    Nicolas
    Keymaster
    Master

    Différents modes de calcul du point pivot. Il n’y a pas qu’une seule formule, chacun utilisera celui qui lui convient.

    thepenguin4 thanked this post
    #184195 quote
    wtangsiri
    Participant
    Junior

    Bonsoir tout le monde

     

    J’ai essayé votre formule pour le calcul du pivot mensuel, PRT me répond :
    Erreur dans l’indicateur Pivot Mensuel
    Un paramètre de type entier positif est attendu avec Highest

    Y a t-il un problème du copier-coller ?

    Merci pour réponse

    #194222 quote
    PRC_2021
    Participant
    Average

    Bonsoir,

    J’ai également cette erreur

    “Erreur dans l’indicateur Pivot Mensuel
    Un paramètre de type entier positif est attendu avec Highest”

    J’ai essayé avec Higt et Low mais cela ne fonctionne pas.

    Merci de votre aide.

    #220899 quote
    Nightster
    Participant
    Junior

    Hélas j’ai la même erreur avec

    monthlyHigh = Highest[BarIndex - lastMonthBarIndex](High)[1]

    “Un paramètre de type entier positif est attendu avec Highest”

    Please Help

    #220909 quote
    JC_Bywan
    Moderator
    Master

    Bonjour,

    remplacer la ligne:

    If Month<>Month[1] then

    par:

    If Month<>Month[1] and barindex>1 then
    Nightster thanked this post
    #221238 quote
    Nightster
    Participant
    Junior

    Merci, effectivement l’erreur n’y est plus
    MAIS
    Ce tracé du pivot mensuel ne correspond pas au pivot intégré à PRT
    Quelqu’un a une solution ?

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

Point pivot mensuel


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

This topic contains 11 replies,
has 7 voices, and was last updated by Nightster
2 years, 5 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 10/30/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...