Da crescente a decrescente

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #50365 quote
    MaxMax
    Participant
    Average

    Qui di seguito una domanda inviata a ProRealTime:

    Vorrei sapere come si fa in programmazione a indicare la condizione del cambio colore. Intendo quando ad esempio una media o una regressione lineare oppure un altro indicatore da crescente diventa decrescente e, sul grafico, cambia colore.
    Per esempio vorrei che si accendesse un alert quando una linear regression a 34 periodi cambia colore.
    Come esprimere questa condizione in termini di programmazione?
    ” if lr[34] cambia colore then
    ……..”

    E un esempio di risposta :

    Ecco un indicatore che darà 1 quando la regressione lineare di 34 cambia da crescente a descrescente.

    indicator=linearregression[34](close)
    
    c1=indicator > indicator[1] and indicator[2] > indicator[1]
    c2=indicator < indicator[1] and indicator[2] < indicator[1]
    
    res=c1 or c2
    
    return res
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Da crescente a decrescente


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Max @max Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/24/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...