prochain point pivot

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

    Bonjour à tous et je vous remercie d’avance pour vos futurs réponses.

    Je souhaite connaitre le point pivot le plus proche de mon prix à l’instant T,  seulement les points pivots sous le prix pas au dessus.

    Par exemple, si le prix est a 21100, que le prochain point pivot est la R1M à 21000, alors il doit me l’indiquer. si pendant la séance le prix passe sous la R1m, il doit m’indiquer le prochain point en dessous qui peut etre par exemple la R2S .

    je veux mélanger les points pivots mensuels et hebdomadaires.. je suis complètement bloqué.

    // Points pivots mensuels
    timeframe(monthly)
    MonthlyHigh = High[1]
    MonthlyLow = Low[1]
    MonthlyPivot = (MonthlyHigh + MonthlyLow + Close[1]) / 3
    MonthlyR1 = (2 * MonthlyPivot) - MonthlyLow
    MonthlyR2 = MonthlyPivot + (MonthlyHigh - MonthlyLow)
    MonthlyR3 = MonthlyHigh + 2 * (MonthlyPivot - MonthlyLow)
    MonthlyR4 = MonthlyR3 + (MonthlyHigh - MonthlyLow)
    MonthlyS1 = (2 * MonthlyPivot) - MonthlyHigh
    MonthlyS2 = MonthlyPivot - (MonthlyHigh - MonthlyLow)
    MonthlyS3 = MonthlyLow - 2 * (MonthlyHigh - MonthlyPivot)
    MonthlyS4 = MonthlyS3 - (MonthlyHigh - MonthlyLow)
    
    // Points pivots hebdomadaires
    timeframe(weekly)
    WeeklyHigh = High[1]
    WeeklyLow = Low[1]
    WeeklyPivot = (WeeklyHigh + WeeklyLow + Close[1]) / 3
    WeeklyR1 = (2 * WeeklyPivot) - WeeklyLow
    WeeklyR2 = WeeklyPivot + (WeeklyHigh - WeeklyLow)
    WeeklyR3 = WeeklyHigh + 2 * (WeeklyPivot - WeeklyLow)
    WeeklyR4 = WeeklyR3 + (WeeklyHigh - WeeklyLow)
    WeeklyS1 = (2 * WeeklyPivot) - WeeklyHigh
    WeeklyS2 = WeeklyPivot - (WeeklyHigh - WeeklyLow)
    WeeklyS3 = WeeklyLow - 2 * (WeeklyHigh - WeeklyPivot)
    WeeklyS4 = WeeklyS3 - (WeeklyHigh - WeeklyLow)
    timeframe(default)

    Cette première étape me permettra par la suite d’ajouter des conditions pour essayer de choper les rebonds lors des baisses.

    Merci beaucoup pour votre aide !

    #243838 quote
    Iván González
    Moderator
    Master

    Holà. Cela me permet par exemple de créer une variable (tg) qui va changer avec la clé pour les niveaux.

    if close crosses over WeeklyPivot then
    tg=WeeklyR1
    elsif close crosses under WeeklyPivot then
    tg=weeklyS1
    elsif close crosses over WeeklyR1 then
    tg=weeklyR2
    elsif close crosses under WeeklyR1 then
    tg=WeeklyPivot
    elsif close crosses over WeeklyR2 then
    tg=weeklyR3
    elsif close crosses under WeeklyR2 then
    tg=weeklyR1
    elsif close crosses under WeeklyR3 then
    tg=weeklyR2
    elsif close crosses over weeklyS1 then
    tg=WeeklyPivot
    elsif close crosses under weeklyS1 then
    tg=weeklyS2
    elsif close crosses over weeklyS2 then
    tg=weeklyS1
    elsif close crosses under weeklyS2 then
    tg=weeklyS3
    elsif close crosses over weeklyS3 then
    tg=weeklyS2
    endif
    #243871 quote
    Nicolas
    Keymaster
    Master

    Dans l’exemple de ce post, j’ai fait une boucle sur les points pivots connu pour déterminer si on était trop prés pour rentrer en position, cela pourrait être adapté à ta situation pour faire l’inverse: https://www.prorealcode.com/topic/prevent-entry-near-pivot-points/#post-202658

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

prochain point pivot


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
alex11j @alex11j Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Nicolas
1 year ago.

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