Instruction needed in ProBuilder code for returning the result to draw on chart.
Syntax:
1 |
RETURN |
Example:
1 2 3 |
myIndicatorToDraw = RSI[14](close) RETURN myIndicatorToDraw COLOURED(210,105,30) AS "my RSI" |
On peut coloriser la sortie et lui donner un nom (ex : RETURN myRSI COLOURED(5,5,5) AS “mon RSI”) mais je ne sais pas s’il est possible de forcer le style d’affichage, par exemple pour obtenir un Histogramme ou des Points à la place d’une Ligne.
C’est possible avec l’instruction STYLE: https://www.prorealcode.com/documentation/style/
Time traveler, Just back from the past!
One quirk I’ve come across with the RETURN instruction is if you build an indicator with more than one return value, in the configure>settings, you have the option to turn the 1st ‘Line’ off. How can that screw with the time line I here you cry. Wait!
Now if you later reduce the number of indicator return values down to one, in your development cycle, and rebuild it, Line1 doesn’t appear, but the scale and color zone indicate that its is there somewhere hiding.
After investigating I noticed In the chart panel of the indicator, the square icon of the name label, which displays the unique colors used in the indicator, was grey’ed to the background color of the label. This is similar to when you choose ‘Hide’ an indicator.
So in the configure>settings>indicator wondering whats happening, the ‘Line’ options are there but are grey’ed out, and if that’s not frustrating, the fact that it appears colors are set and no option to turn it on doesn’t help even if you were to think of that!
The solution is quite simple, but, not when you did the change hours/days earlier and those brain cell have kicked the bucket…etc.
Here’s what to do. Travel back in time. We’ll not literally.
Rebuild the indicator with a temporary second RETURN value, this gives access to the color setting for more than one Line and magically, the on/off switch for Line1.
Enabling Line1, removing the temporary value and a rebuild, puts the time line is back to normal!.
If you come across this, I hope with the time you save you can ponder the following;-
Why doesn’t the ‘BORDERCOLOR’ instruction appear in the PRC Documentation Categories and also the PRT Function Categories. As this just been over looked or is it some sort of conspiracy on the border (color). There must be something special about it!. Don’t get me started.
The journey starts with RETURN. All hail the great one!
Bonjour,
Peux-on coloriser ou affficher le retour de l’indicateur directement sur le graphique ?
Il faudra pour cela attacher l’indicateur au prix directement.