MT4 - MT5 Indicators & EAs - Phylo

Phylo

Veteren member
Messages
3,592
Likes
389
From time to time, I will post - as scrapbook collage for a wider project - MT4, MT5, and possibly some cTrader indicators and EAs that I have modified or coded over the years.

I do not endorse or recommend any of the indicators or EAs posted here.
Some are modifications or coded originals as a form of entertainment—in response to forum requests—others, developments for my own research and use.
I won’t be distinguishing between the two.

Due to code theft and resale by individuals of non-existent or questionable coding ability, source code will not be given.

Coding requests:
I do not accept coding requests. I married a Countess, who considers trading to be "macho peasant entertainment"—entirely beneath her station.
"Well, if it’s not inherited, one does have to wonder—what on earth is it, darling?"

Consider these contributions—quick sneaks from my former, humble peasant self.

Posting will commence as and when time permitting.
 
Last edited:
If you marry a countess, do you become a count?
Aye, that be so, but not as big a count as yourself - that would be impossible!
I know when I'm out classed and Britain is a terribly hierarchical class society.
You have to know your place - and I could never compete against your count credentials.
As a count by birth, that's an unbeatable title that even comes with its own (Y) count coat of arms.
What luck ! - by virtue of inheritance & birth, you counts are the biggest counts this side of Countbuckinghamfek.
A whole ancestral tree of counts.
Nothing beats, a born count. 😛
 
Last edited:
MT4 & MT5
# - SYMBOL_PERIOD
Screenshot from 2025-06-02 05-00-07.png
 

Attachments

Last edited:
Aye, that be so, but not as big a count as yourself - that would be impossible!
I know when I'm out classed and Britain is a terribly hierarchical class society.
You have to know your place - and I could never compete against your count credentials.
As a count by birth, that's an unbeatable title that even comes with its own (Y) count coat of arms.
What luck ! - by virtue of inheritance & birth, you counts are the biggest counts this side of Countbuckinghamfek.
A whole ancestral tree of counts.
Nothing beats, a born count. 😛
I am very happy that you got it. There are still people of intelligence and humour in the world. Thanks the Gods
 
I am very happy that you got it. There are still people of intelligence and humour in the world. Thanks the Gods
Touché

And in conclusion:
Not only in communist society, but perhaps more so in capitalist society, 'all counts are equal, but some counts are more equal than others.' *
I depend on the Countess for social status and essential count comforts. Should the Countess discount me, I will fall from grace—back to cabbage valley, among the likes of Baroness Crack Head and Lord Fentanyl. Low-cost housing comes with these colourful inconveniences.
So I am a less equal count.
Now a born count. No contest. No fear of discounting from any Countess.
A count by birth, a count by death, always a count—the more equal of all counts in the kingdom of counts.

*Animal Farm - author: George Orwell
All animals are equal, but some animals are more equal than others.
Freely available on the www in .pdf and other formats.

Any download off the www should first always be checked with the free, multiple (70) antivirus checker, VirusTotal.: https://www.virustotal.com/gui/home/upload

In actuality:
If an ordinary man (a man without a title) marries a British Countess who holds her title in her own right (as a substantive peeress, not just as the wife of an Earl), he does not acquire any courtesy title or style by virtue of the marriage. He remains "Mr" and does not become "Earl" or "Lord" or receive any other noble style through his wife's peerage15. This is a key difference from the wives of male peers, who do take on the feminine version of their husband's title (e.g., the wife of an Earl becomes a Countess)1.
 
Last edited:
MT4 & MT5
# - DAYS_WEEKS_RANGE_POINTS_PIPS_PRICE
Note: If the indicator is renamed it will not function and alert. The only solution to re-function the indicator is to return the indicator to it's original name.
  • A research indicator for range comparison
  • Range Options: Points - Pips - Price
Screenshot from 2025-06-04 14-09-34.png


TSLA vs AAPL Range - Price
TSL-PRICE.png


AAPL-PRICE.png

Range - Points
Points.png

Range - Pips
Pips.png
 

Attachments

Last edited:
MT4 & MT5
# - OPEN_POSITIONS
Note: If the indicator is renamed it will not function and alert. The only solution to re-function the indicator is to return the indicator to it's original name.

Screenshot from 2025-06-05 22-42-23.png

  • Indicator Objectives:
    • Eliminate use of sub window and save on chart real estate
    • simplify open position data.
  • The indicator supports a maximum of 10 open positions
  • Row format: Symbol - Lots - Points - Position Total Profit / Loss - [ Account Total Profit / Loss ]
MT4 Calculation:
DOW_ecn: $ 0.31 - 0.08 = $ 0.23
EURUSD_ecn: $ 8.00 - 0.08 - 0.54 = $ 7.38
Account Profit / Loss = $ 0.23 + $ 7.38 = $7.61
Screenshot from 2025-06-05 19-48-15.png


Note:
  • MT5 does not have a Commission column option in the Trade Terminal.
  • Further, commission calculation is not available for calculation on open positions.
MT5 Calculation:
GBPUSD: $ 7.66 - 3.00 = $ 4.66
EURUSD: $ 0.13 = $ 0.13
Account Profit / Loss = $ 4.66 + $ 0.13 = $ 4.79
Screenshot from 2025-06-05 23-15-42.png

Commission calculation is only available on closed positions.
Screenshot from 2025-06-05 23-26-23.png


MT5 Commission Display: Key Differences from MT4
1.
  • MT4: The commission column is visible directly within the Trade tab, allowing users to see commission charges on open positions and trades in real time.
  • MT5: The commission column is not displayed in the Trade tab. You cannot view commission charges for open trades here.
2.
  • MT5: To view commission details, you must switch to the History tab. Here, you can review completed trades and their associated commissions.
  • How to View Full Details:
    • Right-click within the History tab.
    • Select Orders & Deals from the context menu.
    • This will display comprehensive information for each transaction, including commission, swap, and other details.
3.
  • In MT5, commission details are only available after trades are closed and are found in the History tab, not in the Trade tab as in MT4.
  • For full transaction details, use the right-click > Orders & Deals option in the History tab.
The commission column was removed from the MT5 Trade tab for several technical and operational reasons:
  • Synchronization Issues with Broker Servers: One significant reason is to reduce synchronization mismatches between MT5 and broker servers, such as CQG. Since some brokers do not calculate commissions per trade on their servers (only trading profit and loss, not commissions), displaying commissions in real time in the Trade tab could cause inconsistencies between what MT5 shows and what the broker’s system records. This led to frequent and unnecessary synchronizations, so the commission display was removed to avoid these issues and ensure that only trading PnL is calculated in real time in MT5, matching the broker’s records1.
  • Commission Charging Logic in MT5: Unlike MT4, MT5 can charge commissions in various ways—sometimes splitting them between the opening and closing of a trade, or applying them at different times and in different formats (per lot, per deal, as a percentage, etc.). This complexity makes it difficult to display a single, real-time commission value for open trades in the Trade tab. As a result, commissions are only finalized and displayed after a trade is closed, which is why they appear only in the History tab2356.
  • Platform Design and Reporting: MT5 is designed to show full trade costs, including commissions, only once the trade is completed. This aligns with its more advanced reporting and historical analysis features, which are accessible in the History tab, not the Trade tab357.
In summary, the removal of the commission column from the MT5 Trade tab was primarily to avoid technical mismatches with broker systems and to accommodate the more complex ways commissions can be charged in MT5, ensuring accurate reporting only after trades are closed12356.
 

Attachments

Last edited:
Back
Top