Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Forex Probability Theory Expert Advisor - MetaTrader 5 Expert - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

Probability Theory Expert Advisor for Forex - expert for MetaTrader 5

Probability Theory Expert Advisor for Forex - expert for MetaTrader 5

One of my oldest ideas. This code is an Expert Advisor (EA) for the MetaTrader 5 platform, which uses probability theory to determine the probability of rising and falling prices of financial instruments.

Probability Theory Expert Advisor for Forex - expert for MetaTrader 5

The EA analyzes the price history of a certain number of bars (default 10000) and counts the number of times the closing price was higher or lower than the opening price by a certain number of points (default 400 points) within a cluster of a given number of bars (default 50). Based on this data, the EA calculates the probability of price increases and decreases and displays it in the chart's annotations.

The EA can also perform trading operations based on calculated probabilities. If the probability of the price rising exceeds 51%, the EA can open a buy position, and if the probability of the price falling exceeds 51%, the EA can open a sell position.

When opening a position, the EA can use a fixed lot size or it can be calculated based on the specified risk and the current account balance. If Stop Loss and Take Profit values ​​are set, the EA will set the appropriate levels when opening a position.

First, the flag must be set to True:

 input boolean enablecheckbar = false ;
It is not profitable and never will be. Everything to do with calculating moves, waves, chances of reaching stop loss and take profit is nonsense. The market is too complex for such simple algorithms and ideas.


KopierMaschine is a local copier that can copy trades between different MetaTrader 4 and MetaTrader 5 accounts on one computer in any direction and has an intuitive interface.

This indicator calculates and displays the Exponential Moving Average (EMA) on MetaTrader 5 charts. Fully customizable period. Allows selection of applied prices (closing price, opening price, high price, low price, middle price, typical price, weighted price). Using the standard EMA formula, initialize the SMA from the first bar. Can be used as a standalone technical analysis tool or integrated into automated trading systems to implement trend following and moving average crossover strategies.

It is a script that displays the time remaining until the next bar is reached.

It is a zigzag that creates new zigzag turning points based on the passage of a volatility threshold


Attachment download

📎 quant_ea.mq5 (13.36 KB)

Source: MQL5 #49770

Verification code Refresh