Adding Input From Custom Indicator Into Strategy

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #235038 quote
    MishapMishap
    Participant
    Junior

    Hi Guys,

    Apologies if this is a stupid question but i am new and have hit a wall with how to proceed.

    I have created and indicator that shows an arrow when certain conditions are met. how do i add this parameter to a custom strategy so that when it is triggered I can use the parameter as part of the conditions. Do i need to add the indicator code to the strategy as a separate part of the code (almost like a function) or can i call the parameter from the custom indicator, if so how do i do this given it may return 2 different conditions?

     

    Thanks in advance & sorry i have searched this but the solution is not easily found or i am not understanding.

    #235041 quote
    Niklas87Niklas87
    Participant
    New

    You can use the code as a function and change it a littel to fitt, or use the Call function to load any coustome indicator you make.

    It it makes 2 differnet arrows i gess you have 2 different outputs?

    So can make:

    If green then

    C1 = 1

    Elsif

    Red then

    C2 =1

    Endif

    Mishap thanked this post
    #235043 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    You can embed it into your strategy, or you can use CALL which is similar to functions (functions will be supported in a future version):

    myValue = CALL "myIndicator"[parameter1]
    myValue = CALL "myIndicator"[parameter1,parameter2]
    myValue1, myValue2, myValue3 = CALL "myIndicator"[parameter1,parameter2]
    myValue1, ignored, myValue3 = CALL "myIndicator"[parameter1,parameter2]

    use IGNORED when you don’t need one of the returned values.

    If you export your code, also the CALLed indicators will be exported. The same when you import your code.

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

    Mishap, Iván González and druby thanked this post
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

Adding Input From Custom Indicator Into Strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Mishap @mishap Participant
Summary

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

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