PRT Function to Detect Instrument Name/Code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #179243 quote
    scoot3r83
    Participant
    Average

    I  am  building an indicator which there are slightly different requirements for each stock index (i.e.  ASX, DAX, NQ, etc.). Within ProRealTime, is there the ability in the coding to be able to confirm the instrument that is loaded on  the chart?

    For example

    if ASX is loaded, then ‘do this’

    or

    if DAX is loaded, then ‘do that’

    I know in TradingView this can be done, just not sure on ProRealTime.

    NeoTrader thanked this post
    #179244 quote
    robertogozzi
    Moderator
    Master

    It’s not possible, as of the current version.

    We all hope this feature will be supported in a next version.

    #179245 quote
    robertogozzi
    Moderator
    Master

    Actually you could do this manually, by adding a variable to be set from the indicator’s properties, say ranging from 0 to 5 (or any greater value of your choice):

    MyAsset = 0  //0=Dax, 1=Asx, 2=EurGbp,…
    If MyAsset = 0 then
     .
    Elsif MyAsset = 1 then
     .
    Elsif MyAsset = 2 then
     .
    Elsif MyAsset = 3 then
     .
     .
     .
    Endif

    when you add it to a chart you can simply change that value from the properties.

    You will have to keep a paper list of  the chosen assets and their codes next to your PC.

    scoot3r83 and NeoTrader thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

PRT Function to Detect Instrument Name/Code


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
scoot3r83 @scoot3r83 Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/09/2021
Status: Active
Attachments: No files
Logo Logo
Loading...