Variables

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6928 quote
    AleX
    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
    Nicolas
    Keymaster
    Master

    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.

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 Nicolas
9 years, 9 months ago.

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