I have recently completed both the beginner and advanced video courses and will probably need to do them again to better grasp all the content. I also have hard copies of the three programming guides. The ProOrder guide recommends that indicators are coded in the trading system rather than ‘calling’ them, however when I do this the return command isn’t accepted and I need to display the indicator and adjust the variables separately on the chart. So I’m unclear the best way to integrate ProBuilder, ProScreener and Pro Order or whether they need to be kept separate. I’m sure more practice will help – just thought I’d ask anyway!
RETURN is accepted only by ProBuilder when creating indicators.
If you embed your code in a strategy (or within a Screener or another Indicator) RETURN is not accepted because it is useless. Its purpose is to RETURN values tu the CALLer, since it’s not being called RETURN is not needed.
If your indicator is (very simple and stupid):
1
2
RangeAverage=average[20,0](range)//simple average of the range of the las 20 bars
RETURNRangeAverage
when you embed it it in a screener, rather than CALL it, you’ll have to write:
1
2
3
RangeAverage=average[20,0](range)//simple average of the range of the las 20 bars
// instead of RangeAverage = CALL "MyRangeIndicator"
SCREENER[RangeAverage>(20*pipsize)]//return those instruments whose average range is greater than 20 pips
this will make execution and backtests much faster.
This should be supeseded in a future release, since it’s rumoured PRT is going to automatically load indicators with your code at launch time, thus making them like a common function in programming languages.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue