How to register as a universal value

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #200814 quote
    Forever beginnerForever beginner
    Participant
    New

    There may be strange places because I am using translation

    Is there a way to register any value as universal?
    For example, if close[2] > close[1] and close[1] < close, then set close[1] to x and impossible to change x after that.

    #200824 quote
    NicolasNicolas
    Keymaster
    Legend

    So you want to change the value of an internal constant (price of the instrument)? Not possible šŸ™‚

    But you can create your own “constant” by using an array, let’s call it $close

    test = close[2] > close[1] and close[1] < close
    if test then 
     i = i + 1 //increase the array size 
     $close[i] = medianprice //change x with what value you want to store
    endif 
    
    return lastset($close) //visualize the last stored value
    Forever beginner thanked this post
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

How to register as a universal value


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/14/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...