Chart Logic: Chart Automation for MT4 – Charts – January 11, 2024
Chart Automation for MT4: Turn your ideas into action!
If you are trading with MT4 and are not a programmer, there is very little you can do in terms of automation. In addition to what you can do manually (open/close a trade), you can also place pending orders (open buy/sell when the price reaches this level). You can display warnings in your charts. That’s it. But what if you want to add a little more logic than this? If the price closes above yesterday’s high and then below yesterday’s high, you initiate selling. Or, if I’m in a buy position and RSI falls below 30.0, please send me a notification. Or, more generally, if A, B, and C are true, then do X and Y. Unless someone coded a script, indicator, or EA that does exactly what you want, you’ll be watching the charts for them. Conditions arise that allow you to perform these tasks manually.
building blocks
Chart Logic is an EA for MT4 that allows you to define conditions for items on a chart and perform actions when all conditions are met. Conditions can relate to a wide range of items such as candle data (high/low/open/close as well as calculated data such as top/middle/bottom, wick size, bull/bear candles, etc.), technical indicators, time of day. You can check account information, transaction information, etc. on the same day. The action may be to send an alert or notification. Open/close a trade or position; Draw objects (lines, text, rectangles, etc.) on the chart. And more. Now you can simply define a set of conditions to test and an action to perform.
strategy
Conditions to test and actions to perform are grouped together in “logical sets.” All actions are triggered when all conditions are met. You can also combine sets of logic into strategies that run on one or more charts. You tell the strategy which symbols you want to execute (if you are trading), give it a magic number and activate it. Chart Logic runs strategy instances on all charts configured in memory, regardless of which chart is running. You can safely change charts while your strategy is running, and Chart Logic tracks everything without missing a beat (er, tick).
Test your chart logic strategy in MT4 Strategy Tester
Strategy files can also be tested in the MT4 Strategy Tester, allowing you to check their performance and gradually improve them. Chart Logic files can be saved to disk and reloaded, or imported into other strategies. I’ve been building a library of conditions in Chart Logic, each of which handles individual bits of automation, so I can reuse them in strategies I’m developing when needed. This includes typical features such as displaying BE lines on charts, trade or position panels (depending on the trading logic of your strategy), target lines for open positions, ADR lines, key level lines, etc. There are also different approaches to the entry conditions I am exploring, such as simple price action signals (swing high, swing low, higher high, close below the swing low with a short entry signal), which can simply be incorporated into the strategy. Don’t like that signal? You can then adjust it to suit your own logic. You can develop a complete trading strategy based on your own ideas, rather than being limited to what’s coded in someone else’s EA. In fact, Chart Logic is a rules engine for programming declarations for chart conditions and performing actions on charts.
Use third-party indicators in your chart automation!
One type of condition in chart logic is an indicator condition. There are about a dozen built-in indicators available. This means that the Indicator Conditions dialog box contains all the parameters needed for these indicators so you can adjust them to suit your preferences. But what if you want other indicators? There is a “custom” indicator type available, which allows you to import third-party indicators and add them to your chart logic strategy. As long as the indicator exposes data correctly in MT4, you can access its data buffer and use that data. By displaying MT4’s data window and placing the indicator on the chart, you can tell whether the indicator is exposing the buffer correctly. The buffer is displayed in the data window. You can pass custom parameters to an indicator and test it in real time to ensure that the connection to the indicator is working correctly, and then integrate the data from this indicator into your EA logic.
You can now easily integrate any third-party indicator into your custom trading logic. If you have a metric you rely on, but it’s not behaving as you want, you can build some logic around it. Want to be notified when an indicator reaches a certain state but doesn’t support alerts or notifications? Solved. Or do you want to use the indicator’s data as a market condition for entry or as a signal for opening/exiting a trade? complete. If you can describe it in terms of conditions and actions, you can automate it. Unlock Achievements!
Chart Logic File Library and Community
There is a website where the functionality of Chart Logic is documented and we are building a library of Chart Logic files to demonstrate specific features (this is just getting started, but it will definitely grow!). You can study it to see how the task is performed and use it in your own logic, either as is or as a starting point for more sophisticated logic. The point is that you may not agree with what I’ve shown you how it works and want to change the behavior. It’s up to you! There is a library of strategy files designed to trade some of the standard trading strategies (Bollinger Bands, Moving Average Crossovers, ADR Pullbacks, etc.), but these are designed more to demonstrate what CL can do rather than to be used as a live trading strategy. . You can also upload your own CL files to the library to share them with other members of the CL community. Now you can write, test, share, and run files for MT4 without writing a single line of code. Chart Logic might be the last EA you need to buy!
What do you want to automate with Chart Logic? Put your ideas into action!