Variables

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

    Hi, I want to know if I can use Variables that once defined maintain a certain value.

    Example, control=0 but if the price falls below the lower band of Bollinger then control = 1. When the price rises above the lower band of bollinger I wish the variable “control”  to remain “1” and not been changed to 0. It’s possible? Thank you

    #6934 quote
    NicolasNicolas
    Keymaster
    Legend

    If you define a value to a variable, this value remain the same until a new one is saved into it.

    However, you’ll need to set your variable with a conditional statement like this:

    if close crosses under bollingerdown[20] then
     var = 1
    endif
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

Variables


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
AleX @bidolia Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/12/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...