Indicateur chiffre rond Forex

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

    Bonjour,

    J’ai suivi ce tutoriel : https://www.youtube.com/watch?v=VXpKcRfo_So&t=454s pour créer un indicateur de chiffre rond.

    Cela fonctionne très bien pour le DAX mais je n’arrive pas à le modifier pour qu’il puisse fonctionner sur le forex, j’ai toujours la valeur à zéro.

    roundnumber = 25
    
    for i = 1 to roundnumber DO
    if (close+i*pointsize) mod roundnumber*pointsize = 0 THEN
    upper = round(close+i*pointsize)
    if upper mod roundnumber = 1 THEN
    upper = upper-1
    ENDIF
    break
    ENDIF
    NEXT
    
    
    for i = roundnumber downto 1 DO
    if (close-i*pointsize) mod roundnumber*pointsize = 0 THEN
    lower = round(close-i*pointsize)
    if lower mod roundnumber = 1 THEN
    lower = lower-1
    ENDIF
    break
    ENDIF
    NEXT
    
    return upper,lower

    Merci beaucoup pour votre aide et très bonne journée.

    #174382 quote
    JC_Bywan
    Moderator
    Master

    Bonjour, la modif ci-dessous devrait permettre de le faire fonctionner en forex sans entraver son fonctionnement précédent sur indices:

    roundnumber = 25
    pipclose=close/pipsize
    
    for i = 1 to roundnumber DO
     if (pipclose+i) mod roundnumber = 0 THEN
      pipupper = round(pipclose+i)
      if pipupper mod roundnumber = 1 THEN
       pipupper = pipupper-1
      ENDIF
      break
     ENDIF
    NEXT
    
    for i = roundnumber downto 1 DO
     if (pipclose-i) mod roundnumber = 0 THEN
      piplower = round(pipclose-i)
      if piplower mod roundnumber = 1 THEN
       piplower = piplower-1
      ENDIF
      break
     ENDIF
    NEXT
    
    upper=pipupper*pipsize
    lower=piplower*pipsize
    
    return upper as "upper", lower as "lower"
    netskiss and Nicolas thanked this post
    #174570 quote
    netskiss
    Participant
    Average

    Bonjour,

    Merci beaucoup.

    Très bonne journée

    🙂

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

Indicateur chiffre rond Forex


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
netskiss @netskiss Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by netskiss
4 years, 7 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 07/30/2021
Status: Active
Attachments: No files
Logo Logo
Loading...