sending parameters to an indicator

Forums ProRealTime English forum ProBuilder support sending parameters to an indicator

Viewing 9 posts - 1 through 9 (of 9 total)
  • #51763

    Hello,

    I am new on this… Here is my question:

    I created a personalised indicator.  I would like to call this indicator from an algortithm.  When making the call, is there a way to include a parameter that I pass to the indicator.

    It looks like I can send parmeters for a standard indicator (p, q, … for bollanger…).

    I don’t see this on the online documentation.

    Thanks for your help.

    Roger

    #51776

    Official documentation https://www.prorealcode.com/documentation/call/ .

    Variables on the left side are those returned in the same order as in RETURN.

    Parameters after CALL  should   match the order in which you defined dynamic variables when building your indicator.

    1 user thanked author for this post.
    #51778

    thanks for the answer.  my question is about the after call parameters (parameter1, etc).

    myValue = CALL “myIndicator”[parameter1,parameter2]

    if i write   myValue = CALL “myIndicator”[50,10] : how can i use them in myIndicator ?

    I would like (as an example), send 50 to myIndicator that will use it in a variable (  for example  var = parameter1 * 2.  Since I put 50 in the call, this means that var would be 100 in the Indicator program

    i hope this is clearer

    #51782

    When I read your answer again, you mention “dynamic variables when building your indicator.”

    i guess this is why i was not understanding how this works.

    I will write again my indicator and define the variables.  This should fix the problem.

    Thanks again

    Roger

    #51785

    It was clear even before.

    You have to define as many dynamic variables as you want when building your indicator.

    On the bar above your code there is a button with a wrench that will open a box to add variables with default values that you will overwrite when calling.

    The order in which you write your parameters must be in the exact order you added your  variables.

    If you define variables Avgx and C, the value of parameter1 will be stored in Avgx, the second one in C.

    Roberto

    #51786

    It was clear even before.

    You have to define as many dynamic variables as you want when building your indicator.

    On the bar above your code there is a button with a wrench that will open a box to add variables with default values that you will override when calling.

    The order in which you write your parameters must be in the exact order you added your  variables.

    If you define variables Avgx and C, the value of parameter1 will be stored in Avgx, the second one in C.

    Roberto

    #51788

    Sorry for duplicating my post, I was trying to edit it, instead I doubled it!

    #51798

    Let me know if you can’t fix it.

    As soon as I am in front of my PC I’ll be able to attach some screenshots.

    #51810

    it’s fixed

    thanks

Viewing 9 posts - 1 through 9 (of 9 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login