uso del while

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #239085 quote
    Antonio Garbinesi
    Participant
    Average

    Buonasera
    Usando il while vorrei identificare una condizione che mi indica quando lo stocastico k è inferiore a 20 (come da screenshot)

    #239094 quote
    druby
    Participant
    New

     

    return Stochastic[14,3](close)< 20
    robertogozzi and Iván González thanked this post
    #239096 quote
    Antonio Garbinesi
    Participant
    Average

    si certo e ti ringrazio ma io a scopo didattico cercavo di descrivere la stessa cosa usando il while,come puro esercizio personale

    #239102 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    DEFPARAM DrawOnLastBarOnly = True
    mioStocastico = Stochastic[14,3](close)
    i = BarIndex
    WHILE i > 0 DO
       Offset = highest[10](range[10])
       j      = BarIndex - i
       IF mioStocastico[j] < 20 THEN
          DrawText("✘",BarIndex[j],lowest[10](low[j]) - Offset)
       ENDIF
       i = i - 1
    WEND
    RETURN
    druby and Iván González thanked this post
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

uso del while


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Summary

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

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/16/2024
Status: Active
Attachments: 2 files
Logo Logo
Loading...