Hi
Is it possible to return a value (ex: 1.3) from an indicator to a system and how do I code that?
This is a one-line indicator that does the job:
RETURN 1.3
You need to use CALL to get the returned value from it:
ReturnedValue = CALL "MyIndicator"
you don’t need to write any parameter since it doesn’t expect any, as it only returns one value.
Tnx, if I have multiple numbers, how do I write that?
Indicator
RETURN 1.3,20,5
Strategy:
X,y,z = CALL "MyIndicator"
If you strategy doesn’t need all the three returned values, it may use the keyword IGNORED for those unwanted:
X,ignored,z = CALL "MyIndicator"