How to access indicator values using OLE Automation

(To mod: I posted this yesterday, but it didn't go through. Sorry for the duplicate)

Hi All,

Is it possible to access an indicator value through OLE Automation? Say if I want AB to calculate MACD of SPY, then I want to get the MACD value using a scripting language?

I have read the OLE Automation doc, past newsletters and search the archives, but found no example.

Any sample code is appreciated

Only if your indicator writes values to files (see fopen/fputs/fclose functions).

I also want to pass on the parameters to AB, say if I want AB to calculate MACD(20,50), then I guess I have to put the parameters values into a file, and have AFL read them

Yes you can store parameters to file like this:

param1 =  12;
param2 = 234;

and use

#include <filename>

so file is automatically included: AFL Function Reference - #INCLUDE

Thank you.
One more question:
Is there a way to modify the settings in Walkforward analysis, e.g. data range for OOS, IS etc? I looked inside .apx file but it didn’t seem to include settings for walkforward.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.