Forums › ProRealTime English forum › ProOrder support › Help with CALL code › Reply To: Help with CALL code
11/14/2018 at 12:45 PM
#84842
I almost never used CALL because it made backtest slower and I preferred embedding the indicator within the code. Now things must have changed, because PRT was due to load any CALLed indicator together with a strategy, thus making it available as if it were written inline and it appears this improvement is working now, so CALLing an indicator from a strategy should be just like any function in all languages.
CALLing should be working in all TF’s, provided you CALL it from the TF you want and, if you CALL it from more than one TF you need to assign its returned values to variables named differently:
1 2 3 4 5 6 7 8 |
TIMEFRAME(Daily) MAdaily = CALL "MyAverage"(200) TIMEFRAME(4 hours) MAh4 = CALL "MyAverage"(200) TIMEFRAME(1 hours) MAh1 = CALL "MyAverage"(200) . . |