contatore di candele

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #193271 quote
    emanuele81emanuele81
    Participant
    Senior

    Buonasera,

    avrei bisogno di un contatore di candele long e short,

    deve individuare l’ultima candela long oppure short di un periodo, da poter inserire poi in una strategia,

    come posso scrivere il codice.

    Grazie

    #193298 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Ecco:

    Once Nlong  = 0
    Once Nshort = 0
    If close > open then
       Nlong = Nlong + 1
    Endif
    If close < open then
       Nshort = Nshort + 1
    Endif

    Nlong e Nshort conterranno, rispettivamente, il numero di candele Long e Short fino a quel momento.

Viewing 2 posts - 1 through 2 (of 2 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

contatore di candele


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
emanuele81 @emanuele81 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years, 4 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 05/16/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...