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

Clickable Button Example (Close All Positions) - MetaTrader 5 Expert | Forex Indicators Download - MT4/MT5 Resources

author EAcpu | 4 reads | 0 comments |

Example of adding a button for an advisor.

In this example, a button has been implemented to close all active positions for all instruments.

In addition to the button event handling function, a method for closing positions relative to the symbol name and a method for calculating the position quantity relative to the symbol name are also implemented.

DeltaFusion Lite is a simplified version of the MT4 DeltaFusionPro indicator. It calculates and displays cumulative delta and net delta, allowing traders to clearly understand the buying and selling pressure within each candle. By analyzing the volume distribution between bid and ask prices, it helps identify changes in market sentiment, potential reversals, and various types of divergences between price and volume.

Use functions instead of ChartXYToTimePrice and ChartTimePriceToXY to work correctly and quickly across the entire range of input parameters

The indicator uses the "quarter theory" - a technical analysis concept that divides price movements into four quarters around a central base level. It is designed to handle multiple asset types (FX, stocks, commodities, etc.) and provides visualization of quarterly levels on charts.

This function calculates the lot size of an open position. The opening price of the trade, the price of the stop loss level and the risk per trade (as a percentage of margin) are passed as parameters


Attachment download

📎etridbuttonexample.mq5 (10.82 KB)

Source: MQL5 #48267

Verification code Refresh