You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Example of creating an indicator based on iATR. Part 5.
code: xSuperTrend.mq5
Until this moment, we performed preparatory operations. Now it is time to write the indicator logic.
To avoid unnecessary calculations, we always work in the 'prev_calculated' variable
Remember that the indicator already has all arrays by the current character (ope, high, low, close, and others) - they are transferred through OnCalculate.
Save the version number 1.005
The end.
Example: catching a Take Profit trigger
The code: Last Deal Take Profit activation.mq5
An example of online work (via OnTradeTransaction).
'm_deal' - undeclared identifier. Does not work.
m_deal.InfoInteger(DEAL_REASON,deal_reason)
m_deal.InfoInteger(DEAL_REASON,deal_reason)
returns a boolean, so your comparison is incorrect.
'm_deal' - undeclared identifier. Does not work.
ignore.
thank you for posting very usefull code , i am learning a lot.
I have a question. Would you consider these two functions adequate to count pending orders and open positions by magic and symbol ?
Thank you for your time and patience. Hope you are well and life is treating you good.
Learn Why and How to Design Your Algorithmic Trading System
Learn how to deal with date and time in MQL5
Advanced Variables and Data Types in MQL5
MQL5 is the programming language of the MetaTrader 5 which is considered the most popular trading platform and it is very rich in tools and concepts that can be used to create any trading system from its simple to complex. Our objective as developers is to understand how to use these tools and concepts to achieve our development objective.
In this article, we will mention and dive deeper to learn more about variables and data types in MQL5 and how they can be useful when creating or building MQL5 trading software. We will learn more about some advanced concepts of variables and data types ...In this article, we will cover the following topics:
Introduction to MQL5 (Part 2): Navigating Predefined Variables, Common Functions, and Control Flow Statements