Custom Indicator Error in Strategy

Forums ProRealTime English forum General trading discussions Custom Indicator Error in Strategy

Viewing 7 posts - 1 through 7 (of 7 total)
  • #146980

    Dear All,

    I am a newbee to proReal and your kind help will be appreciated. As part of my practice, I am trying to develop a a simple strategy using a custom indicator I have developed.

    However I am getting the below screen error:

    Syntax error: The function “#pivotPointAvg” called from “AlgoTrading” returns 5 values but your code needs 1.

    I want my strategy to choose only 1 value from the 5 values generated by my custom indicator so that my Buyor sell condition is triggered – can you kindly direct me where I am getting it wrong?

    Happy trading to all!

    Thanks

    #147002

    @Widzo

    Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.

    Thank you 🙂

    @GraHal

    What should be deleted?

     

    #147003

    The error refers to line 14, you need to use a variable for ALL returned values, if you don’t need sone use the keyword ignored instead of a name.

    Like in line 13.

    If you search the forum for CALL you will find the official description and many examples on how indicators are CALLed.

     

    #147011

    What should be deleted?

    My message. Thank you.

    I jumped in and mentioned use of ‘ignored’, but then I read his code and saw that he uses all the returned values in his strategy.

    #147012

    @Widzo  below is one of the links to what Roberto is referring.

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

     

    #147014

    Thank you so much @GraHal and @robertogozzi for your help! let me follow through your recommendation.

    #147041

    I think Roberto has sorted your code to make it work?

    I wanted to run your Algo, but I do not have the Indicator … #pivotPointAvg”(close) … is it available on the PRC website or might you share it please?

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

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