0

I have multiple VBA agents running in parallel (in different Excel instances on the same PC) scanning 24/24h for an event on multiple crypto currencies. Each agent scans one different crypto. Whenever an agent detects an event, it invests all of my money for some minutes on that crypto.

During these minutes, if another agent happens to detect an event (on another crypto), it should skip (do nothing) because all the money is already invested by the first agent.

In order to share this "INVESTMENT-IN-PROCESS" information along with some details (like my updated balance) among all the agents, I currently use an unique text file on the local disk.

Is there a more efficient (eg. using RAM instead than disk) still safe (persisting even if the generating VBA instance crashes) method to share small (<20 bytes) information among the multiple VBA instances?

6diegodiego9
  • 503
  • 3
  • 14
  • What does "on the disk" mean? Isn't it on network, on a path accessible by all of them? – FaneDuru Jun 20 '21 at 20:34
  • You could use the Windows clipboard: https://stackoverflow.com/a/60896244/3566998 – Excel Hero Jun 21 '21 at 03:10
  • @FaneDuru I just modified the original post: the parallel instances run on the same PC and I currently save and read the info on a local disk – 6diegodiego9 Jun 21 '21 at 07:17
  • @ExcelHero it's too dangerous, as I occasionally update that PC using the clipboard even while the bot is running – 6diegodiego9 Jun 21 '21 at 07:19
  • You could setup a RAM disk and write to that instead of a physucal disk. – Excel Hero Jun 21 '21 at 13:46
  • Anothet option is to create a custom server program that all instances communicate with... but this will require a different programming language to implement the server. – Excel Hero Jun 21 '21 at 13:47

0 Answers0