Return number from indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #179456 quote
    umebonumebon
    Participant
    Average

    Hi

    Is it possible to return a value (ex: 1.3) from an indicator to a system and how do I code that?

    #179460 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    This is a one-line indicator that does the job:

    RETURN 1.3

    You need to use CALL to get the returned value from it:

    ReturnedValue = CALL "MyIndicator"

    you don’t need to write any parameter since it doesn’t expect any, as it only returns one value.

    #179461 quote
    umebonumebon
    Participant
    Average

    Tnx, if I have multiple numbers, how do I write that?

    #179487 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Indicator

    RETURN 1.3,20,5

    Strategy:

    X,y,z = CALL "MyIndicator"

    If you strategy doesn’t need all the three returned values, it may use the keyword IGNORED for those unwanted:

    X,ignored,z = CALL "MyIndicator"
    umebon thanked this post
Viewing 4 posts - 1 through 4 (of 4 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

Return number from indicator


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
umebon @umebon Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/12/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...