Where can I get the ifractals indicator for MT5...the downloadable version in a zip file?
moneyfoundbymichael :
Where can I get the ifractals indicator for MT5...the downloadable version in a zip file?
The iFractals indicator is shipped with the terminal. He is always with you.
You can see a very similar indicator in the MetaEditor: [data folder]\MQL5\Indicators\Examples\Fractals.mq5
nice idea please create one for mt4
Revo Trades :
nice idea please create one for mt4
nice idea please create one for mt4
No. Anyone who drives a Mercedes will never return to the Lada :)
Really cool strategy, thanks for sharing the code. I'm going to make some alterations and get some code ideas from it see if I can make it hugely profitable :)
MT5 is the way forward for EAs, the strategy tester is far superior.
can we add some filter indicators here such as MA or Aligator or Ichimoku Cloud to determine the trend? thanks
Krisma Freddy :
can we add some filter indicators here such as MA or Aligator or Ichimoku Cloud to determine the trend? thanks
can we add some filter indicators here such as MA or Aligator or Ichimoku Cloud to determine the trend? thanks
Yes, you can do that.
Hi Vladimir Karputov, I'm new to mt5...I really like this strategy, congratulations for your ideas and the passion you show...it would be possible to add the possibility of having a fixed take profit to the N pips strategy, I have seen that many times to follow the trend the profit is canceled, because perhaps a new fractal cannot be created and the stop is pierced...unfortunately I tried to understand how to insert it but I was unable. More than having the good strategy and ready I would like to understand where and how to insert it. Thank you@Daniele Valeri
/*
Fractured Fractals (barabashkakvn's edition) EA Explanation: General Purpose:
- This EA, created in 2005 by tageiger, uses the classic iFractals indicator to identify potential reversal points in the market.
- It makes trading decisions based on fractal values by placing pending orders (BuyStop/SellStop) or modifying existing positions (e.g., adjusting Stop Loss levels).
- The EA incorporates risk management by calculating an optimal trade size based on account margin and a user-defined maximum risk percentage. Key Components:
- Libraries: The code includes several MQL5 trading libraries (CTrade, CPositionInfo, CSymbolInfo, CAccountInfo, CDealInfo, COrderInfo) to handle trade operations, manage positions, and retrieve symbol/account details.
- Input Parameters: • MaximumRisk: The maximum risk per trade as a percentage of account equity. • DecreaseFactor: A factor used to reduce the trade size after consecutive losses. • Expiration: The lifespan (in hours) of pending orders. • m_magic: A unique identifier (magic number) to differentiate trades executed by this EA from others. Initialization (OnInit):
- The EA sets up the trading symbol and refreshes market data.
- It configures the trading object with the specified magic number and selects an appropriate order filling type (FOK, IOC, or a default method) based on what the broker supports.
- A handle for the iFractals indicator is created using the current symbol and timeframe. If this fails, an error is logged and initialization is stopped.
- Various fractal-related variables are initialized to EMPTY_VALUE, and the time of the last profitable deal is stored. OnTick Function:
- The OnTick function is triggered on each new bar. It first checks if a new bar has formed by comparing the current bar’s time with a stored timestamp.
- It retrieves the upper and lower fractal values using the iFractals indicator.
- The EA updates a history of fractal values by shifting older values and saving the newest ones.
- It displays current fractal values on the chart through comments for easy monitoring.
- The EA counts current open positions and pending orders. If conditions are met (e.g., a rising sequence for Buy orders or a falling sequence for Sell orders), it calculates an optimized trade size and places a pending order (BuyStop or SellStop).
- Additionally, it adjusts Stop Loss levels for open positions based on the new fractal levels and removes outdated pending orders if market conditions have changed. Risk and Trade Size Management:
- The TradeSizeOptimized function calculates the ideal lot size based on the account’s free margin, the defined maximum risk percentage, and the margin requirement per lot.
- If a series of losses is detected, the EA reduces the trade size further based on the DecreaseFactor.
- The LotCheck function ensures the computed lot size respects the broker’s minimum, maximum, and lot step limits. Additional Utility Functions:
- RefreshRates: Refreshes market data for the symbol to ensure current rates.
- IsFillingTypeAllowed: Checks if a particular order filling type (e.g., FOK, IOC) is allowed by the broker.
- iTime: Retrieves the time of a specified bar, ensuring the EA operates on new bars.
- LastProfitDeal: Scans the trading history to find the time of the last profitable deal, which is used in risk management calculations.
- iFractalsGet: Retrieves fractal values from the indicator’s buffers, with error logging if the data cannot be copied.
- CompareDoubles: Compares two double values to a specified precision to determine if they are effectively equal.
- PrintComments: Updates on-chart comments with the current fractal values and time for monitoring purposes. Summary:
- The EA leverages the iFractals indicator to detect market reversals.
- It automatically places pending orders when certain fractal conditions are met.
- Open positions are dynamically managed by adjusting Stop Loss levels.
- It employs comprehensive risk management to optimize trade size based on current account conditions and recent performance. This well-structured code demonstrates the use of object-oriented programming in MQL5 to efficiently manage trading operations and risk.
*/

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
Fractured Fractals:
The Expert Advisor uses the Fractals indicator signals to place pending orders and trail the Stop Loss level of positions.
Author: Vladimir Karputov