I found the YouTuber who executes with Metatrader, but calculates with Excel: Worth a watch as he apparently discloses his method.
Just want to share a bit more Re: using Excel VBA as a console app where you use the Immediate Window as a command line. This is possible because the Immediate Window (IW) is quite "smart". It will execute any single line of code typed directly into the IW, or any Subroutine (Sub) called by name. If the Sub has parameters, the IW is sensitive enough to offer Intellisense dropdown describing all the parameters you need to make it work, just as if you were typing into a code pane. Similarly, if you are using an Enum in an Enums list, the list will also drop down in Intellisense. First of all, the IW is not an error dump. Rather, error descriptions pop up in message boxes. The IW becomes an error dump, or any kind of info dump, only if you want it to, using Debug.Print. So you have full control of what you want to see. SendKeys really expands the potential uses of the IW. With SendKeys you can focus on the IW itself and copy the entire contents to the clipboard. From the clipboard you can do anything you want with the information. The most common use I have made of this is to save the entire screen (all the info) to file. Then I will also have a routine that will recall the saved file back to the IW simply by reading the file and printing it with Debug.Print. This comes in really handy when rebooting the computer and you want to return to the exact same working environment as before, with the exact same information on the screen. My info on screen is, at minimum, a list of my most commonly used commands, which most often are commands to find and go-to selected places in my codebase. This find-and-select function is also made possible through clever use of SendKeys. This is because SendKeys can manipulate the Find function in the ribbon. This pretty much eliminates the two most common methods of navigation: 1) the dropdown list of functions in a single code pane, and 2) scrolling up and down a code pane trying to eyeball the section of code you are looking for. You can write search code that will find and go to any bookmark, or any keyword, or any Sub/Function on any code pane in your entire project. For example: JT 7 'Sub Main This will call a Sub named JT (jump to) and execute find-and-go routine #7. That routine can select any code pane and bring it into focus. It can find any keyword such as the name of a routine. It can then go to a bookmark within the routine so you can go back to the exact place you are working on on that routine. The IW window is also smart enough to handle comments which are preceded by an apostrophe. Here I have a comment that reminds me what JT 7 does, or where it takes me. In this case it goes to the bookmark in the Main Sub. I will typically list the top 15 places in my codebase that I will most commonly go to. These will be saved and returned to screen on boot up. SendKeys can also put focus on the code pane so you can save the entire contents to the clipboard. From the clipboard you can put the contents into a variable and from there you can manipulate the contents any way you want. One way to use this is you can insert code snippets from file, and insert them anywhere in your code such as at the top, at the bottom, or wherever your cursor is located. You can make code snippets files by putting code into the IW and saving just the snippet to a log file just for snippets. Likewise you can keep a log of project progress by typing notes into the IW and saving those to a dedicated log file. Because of the ability to keep and recall logs, you could, in theory, record your whole history of command line commands. You can write a command line routine that is just as sophisticated as you could wish for. Especially helpful is a command line that makes extensive use of Enum lists which put all your available commands at your fingertips, making them easy to remember. You can use these lists, and dropdown features, to create a basic menuing system that can go levels deep. One menu can call another menu which eventually leads to a specific command.