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.
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
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/