I Can’t Believe I Just Lost All My Studies!
“How can I not restore it? I back up my files every week!” Have you found yourself in this same predicament before. Somehow, I’ve lost my code more times than I care to admit. The TradeStation and MultiCharts paradigm of requiring us to store our precious strategies and indicators in a proprietary, non–text format has its advantages, but to me the drawbacks far outweigh any benefits.
-
Pros of a proprietary library: Seamless integration, single-click compile/run, built-in (if limited) version history, encryption, and straightforward workspace management.
-
Cons: Opaque blobs that aren’t easily diffed, harder to back up in granular increments, potential single point of failure, and extra steps when migrating to other tools.
Git is overkill for a single developer of an EasyLanguage Study.
Most programmers who work in a domain‐specific language like EasyLanguage simply don’t “get” Git. If you’re unfamiliar with Git, here’s a quick definition:
Git is the version‐control system created by Linus Torvalds—yes, the same Linus Torvalds who gave us Linux and turned down a huge payday to release it as open source. Git lets multiple developers track changes, revert to earlier versions, and collaborate seamlessly on code without stepping on each other’s toes.
Git records changes to a project by taking snapshots (commits) of its files and storing them in a distributed repository, so developers can branch and merge independently before synchronizing updates. It’s often hard to grasp because the concepts of branching, merging, and distributed workflows differ from linear, centralized versioning models and require a shift in thinking and terminology.
Fun fact: ChatGPT did a back-of-the-envelope calculation suggesting that, had Linus charged for Linux, his net worth could be as high as $50 billion. In reality, he’s a salaried employee at the Linux Foundation with a net worth closer to $10 million—proof that the open-source model can be wildly generous for everyone except the original author.
What is an EasyLanguage programmer to do?
One straightforward (but labor-intensive) method is to copy your EasyLanguage or PowerLanguage code into a plain-text editor like Notepad and save it in a well-named folder—either locally or in the cloud. That gives you a basic text-based backup. If you want to track versions, you can simply take a snapshot every time you make a change and append a version number to the filename (e.g., MyStrategy_v1.0.txt
, MyStrategy_v1.1.txt
, etc.). For most solo EasyLanguage developers, this ad-hoc versioning is sufficient, since you’re typically the only person editing the code. However, in the unlikelihood that you do collaborate with others, it becomes cumbersome to merge updates or see exactly what changed between versions. In this scenario, learning GIT would be worthwhile.
Because EasyLanguage developers typically work solo (to protect their proprietary code), most don’t bother with Git. And let’s face it—many of us get lazy about backups and versioning. You create a strategy that works, start tweaking it, and before you know it you can’t recall how to revert to the original. Who else has been down that road?
A few years ago, I developed a simple macro with AutoIt where I would hit <CTRL> F9 and all the code in my current editor window was select and copied and saved to a new text file.
Recently I modified the macro to add a version suffix to the filename if the filename already exits. If you hit save and the lates version is _v002.txt, then the macro will save it as _v003.txt
Back up – Checked! Version control – Checked! Anything else?
I do use Git for my multi‐file projects—it’s fantastic for instantly showing me what changed between commits when something breaks. I wish I had that same “see the diff” workflow for my EasyLanguage scripts. Thanks to WinMerge, I actually can: just select two versions of my script, and it highlights every added, removed, or modified line. WinMerge is free to use (they do ask for a small donation if you find it valuable), and now I can conveniently compare any two snapshots of my code—just like I would with Git.
The differences will be highlighted in the document maps on the left side and then also directly in the code.
Take a look at this video to see my workflow.
What good are these tools if you don’t use them?
I tried to make the task of backing up and version control as simple as clicking <ctrl> F9. Now it is up to you to do it. I promise the more you do it, the less of hassle it will become, and I can almost guarantee you will thank me in the future. Trust me – this is as easy as GIT. However, setting up GIT is not a cakewalk.
Here all you need to do is download the two software and following the instructions in getting the following script compiled to an .exe. Trust me it is much easier than it looks. I am providing this information so that I don’t have to provide an .EXE and all of the headaches involved with downloading it. However, if you are cool with downloading an .EXE, then shoot me an email and I will provide a link.
In few days I will publish some results of the work of my “Snap-Back” strategy.
This is the AutoIt script you will need to copy after you download AutoIt. Don’t worry you don’t need to understand it. After the code listing, I give step by step instructions on how to turn the script into an executable.
- Go to the AutoIt website: https://www.autoitscript.com/site/autoit/downloads/
- Under “AutoIt Full Installation,” click Download.
- Run the downloaded installer (
AutoIt3.exe
) and follow the prompts:
- Accept the license agreement.
- Leave all default components checked (this installs both AutoIt and SciTE-Lite).
- Finish the installation.
After this, you’ll have:
- AutoIt (the compiler/interpreter) in your Program Files.
- SciTE-Lite (a lightweight code editor preconfigured for AutoIt) installed, usually at
C:\Program Files (x86)\AutoIt3\SciTE\
Step 2: Open SciTE-Lite and Create a New Script
- Launch SciTE-Lite:
- Windows Start Menu → All Programs → AutoIt v3 → SciTE-Lite (AutoIt)
- Or double-click the SciTE-Lite shortcut if one was placed on your desktop.
- In SciTE-Lite, go to File → New (or press Ctrl+N). You’ll see a blank editor window.
Step 3: Copy Your Script Code from the Website
- Select all of the code (click inside the code block above, then press Ctrl+A) and copy (Ctrl+C).
- Return to the blank SciTE-Lite window and paste (Ctrl+V) the code into it.
Step 4: Save the Script as EzLangToText.au3
- In SciTE-Lite, choose File → Save As… (or press Ctrl+Shift+S).
- In the “Save As” dialog:
- Navigate to
Documents\AutoIt Scripts\
if it exists or stay in the default folder. - For “File name,” type:
- EzLangToText.au3
- Ensure “Save as type” is set to AutoIt v3 Source (*.au3).
- Click Save.
Now SciTE-Lite knows this is an AutoIt script.
Step 5: Compile the Script to an .exe
-
Make sure
EzLangToText.au3
is the active tab in SciTE-Lite. -
Press F7 (or go to Tools → Compile).
- SciTE-Lite runs AutoIt’s compiler (
Aut2Exe
) behind the scenes. - In the output pane at the bottom, you’ll see messages like “Compiling…” and finally “Compiled successfully.”
- When the compile finishes, you’ll find
EzLangToText.exe
in the same folder as your.au3
file.
Step 6: Run the Resulting EXE
-
You can now double-click
EzLangToText.exe
to run it on any Windows PC (no AutoIt installation needed)