Identify instrument

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #53161 quote
    alvestjoalvestjo
    Participant
    Junior
    Hi, Is it possible somehowe to identify what instrumnet the script is running on in the code? My idea is to have one script running on for example on both DAX and FTSE (or 5 more indexes) but with different parameters. If there woule be a “constant” for example INSTRUMENT I could to this:
    if INSTRUMENT="DAX" then
    param1=45
    endif
    if INSTRUMNET="FTSE" then
    param1 = 50
    endif
    Now I have to duplicate the script for every instrument I want to use it on. It is allot of work to update all copies of the script if I make improvements on it. //Jonas
    #53168 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    I think you can’t, at least I could not find a way to do it.

    You have to duplicate your strategy as many times you wish, naming them differently according to the instrument chosen for each one of them.

    Roberto

    #53227 quote
    NicolasNicolas
    Keymaster
    Legend

    In ProBuilder language, variables can’t handle string. There is also no instruction to retrieve the current instrument from the broker’s server.

    A rough idea would be to test the current price and/or the pointsize to know which instrument you are currently using.

Viewing 3 posts - 1 through 3 (of 3 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

Identify instrument


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
alvestjo @alvestjo Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/18/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...