Calling R - chatGPT claims "RCall.amx" plugin avail. in AFL?

I'm hoping to use R to retrieve, clean and manipulate data then pass on results to AB for backtesting.

I've read the 2018 forum post (calling 32bit R, no multi threading). As a lark and alternatives perhaps .. i asked chatGPT how to call R from AB (response below). I haven't been up to date on AB releases but I couldn;t find "RCall" in this forum. was chatgpt making it up? if not please point me to the relevant documentation, thanks

"To call an R script from Amibroker, you can use the AmiBroker's AFL (AmiBroker Formula Language) scripting language. The AFL language provides a built-in function called "RCall" that allows you to execute R scripts and pass data between AmiBroker and R. Here's an example of how you can call an R script from Amibroker:

  1. First, make sure you have R installed on your system.
  2. In AmiBroker, open the Formula Editor by clicking on the "Analysis" menu and selecting "Formula Editor."
  3. In the Formula Editor, write the following AFL code to call the R script:


#include <RCall.amx>


// Execute R script

// Example of passing data from AmiBroker to R
rSet("amibroker_data", your_amibroker_data_array);

// Example of retrieving data from R to AmiBroker
rGet("r_variable_name", your_amibroker_variable_array);


No comment on ChatGPT…
The R plugin is old and unmaintained. As an alternative, you can use the Python plugin and the rpy2 package:

1 Like

Please, no, don't start threads that "ChatGPT claims something" because it is all nonsense. ChatGPT is NOT a knowledge source.
ChatGPT is a LANGUAGE model, it spits out TEXT, not knowledge.
It is good in making up text, fantasy.

All can be read here: ChatGPT is utterly amazing and scary at the same time

R plugin is available from MEMBERS zone but the syntax of its functions is completely different.

For any new codings we suggest using Python plugin instead


There is one and only one thread about ChatGPT here: ChatGPT is utterly amazing and scary at the same time