Step MA Indicator not Recognised by Strategy

Forums ProRealTime English forum ProOrder support Step MA Indicator not Recognised by Strategy

Viewing 3 posts - 1 through 3 (of 3 total)
  • #125670

    PRC_step one more average | indicator

    I love this indicator! It would be great to incorporate it in an automatic trading strategy. However, being a novice to coding I use the “Simplified creation” option and I can find no way to have this indicator’s “steps” over the price recognized in the strategy. Is there a way to overcome this so that the steps are noted in the strategy? Any help appreciated and a HUGE thank you to Nicolas for all that you have created and shared here!!

    #125674

    The only way to include the indicator in a strategy is via hard coding it in.

    This is not that difficult though. Just copy the indicator code into your strategy beneath any defparam instructions and then remove the RETURN line. You may want to then remove the // before the variable settings at the start of the code or add them as optimised variables. You will also need to delete the lines that refer to color. You should then have a value in your strategy called ‘Result’ which is the value of the average so you can check the following;

     

    1 user thanked author for this post.
    #125683

    Actually there is another way  you can CALL the indicator.

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

    Add the following to your strategy and then your strategy will have ‘Result’ as the step average value (not tested):

     

    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

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