How to Install AmiBroker on macOS using Wine (even on M1/M2/M3)

Wine is getting better and better, to the point that right now you can easily and seamlessly install AmiBroker and use it like any other native application. No need to run Parallels or any real Windows except to download the data. But we will find a way sooner or later to overcome that problem.

Let's install wine and winetricks using HomeBrew, which is the de-facto package manager for macOS these days.

brew install --cask wine-stable --no-quarantine
brew install winetricks
winetricks mfc42

Great! Now download AmiBroker.6.93.0.exe (or the lastest version, but 32 bit) and run:

wine AmiBroker.6.93.0.exe
wine ABRegx86.exe

Finally, I suggest you setting the screen resolution to 120 DPI so it will be easier on your eyes

winecfg

That's it! Now you can run AmiBroker and it works incredibly well, including backtesting, reports and everything EXCEPT the communication with AmiQuote

wine "/Users/YOUR_USER_NAME/.wine/drive_c/Program Files (x86)/AmiBroker/Broker.exe"

In order to import data, I simply do it under Parallels and then copy the database to the "/Users/USER_NAME/.wine/drive_c/Program Files (x86)/AmiBroker/databases" directory.

I know it's not the same as having a real Windows or Parallels, but for my use case I don't need to update the data more than once per week, so I can play with strategies and backtests directly from my Mac without the need to having a full Windows VM loaded all the time.

Cheers!
MagicMac

4 Likes

Great contribution.

As to inter-app communication: it is because WINE does not implement Windows OLE automation.

1 Like

Unlike my 15 year old boy, I'm not familiar with wine :laughing:, but a quick search leads me to believe that we might make this work because OLE seems to be implemented.

Maybe there's a way to make it work, or create a patch/script to allow the communication between AmiQuote and AmiBroker. So far, I'm happy working a bit from within Wine because I'm getting the data from a shared NAS that updates the quotes from a real Windows. But I won't give up on this one!

Thanks Tomasz!

I don't think it is implemented correctly. Even their own web site says https://source.winehq.org/WineAPI/oleaut32.html it is only 93% of functions implemented.
It seems that critical function DispFuncCall is not implemented by WINE. Without this function OLE function/method calls can't be made. Maybe winetricks oleaut32 or some other "trick" will do, but I am not wine expert or even user at all.