Discussing the article: "Automating Trading Strategies in MQL5 (Part 1): The Profitunity System (Trading Chaos by Bill Williams)"

 

Check out the new article: Automating Trading Strategies in MQL5 (Part 1): The Profitunity System (Trading Chaos by Bill Williams).

In this article, we examine the Profitunity System by Bill Williams, breaking down its core components and unique approach to trading within market chaos. We guide readers through implementing the system in MQL5, focusing on automating key indicators and entry/exit signals. Finally, we test and optimize the strategy, providing insights into its performance across various market scenarios.

The Profitunity System, crafted by Bill Williams, utilizes a set of specialized indicators that allow us to understand and act on the chaotic movements in the market. The strategy combines the power of trend-following and momentum indicators to create a dynamic, highly responsive trading methodology. The system identifies trend reversals and market acceleration, helping us find high-probability trade setups. The key indicators used in the strategy are:

  • Fractals
  • Alligator
  • Awesome Oscillator (AO)
  • Accelerator Oscillator (AC)

Each of these indicators works together, providing critical insights into market conditions and offering entry and exit signals. Let us have a deeper look at the individual indicator settings that apply to the strategy.

Author: Allan Munene Mutiiria

 
Thank you. Very well explained (thanks to the many comments in the programme code) and easy to understand even as a newcomer to Mql5. Well suited for beginners in MQL5. I will also work through the other articles in your series and hope that I can then also implement my own EA's.
 

I have a question for the author of the article regarding this part of the text:

В частности, мы инициализируем четыре переменные типа integer: "handle_Fractals", "handle_Alligator", "handle_AO" и "handle_AC» со значением INVALID_HANDLE.

As a beginner in MQL5 programming, it is not quite clear to me why it is necessary to initialise handles of all indicators with INVALID_HANDLE value at once? What will happen if we declare indicator handles without initialisation? The Expert Advisor will not work or what?

Regards, Vladimir.

 
Lagge #:
Thank you. Very well explained (thanks to the many comments in the programme code) and easy to understand even as a newcomer to Mql5. Well suited for beginners in MQL5. I will also work through the other articles in your series and hope that I can then also implement my own EA's.

Thanks for the kind feedback. Sure. Welcome.

 
MrBrooklin #:

I have a question for the author of the article regarding this part of the text:

As a beginner in MQL5 programming, it is not quite clear to me why it is necessary to initialise handles of all indicators with INVALID_HANDLE value at once? What will happen if we declare indicator handles without initialisation? The Expert Advisor will not work or what?

Regards, Vladimir.

Thanks for the kind feedback. It is not a must you initialize the handles but it is a good programing practice doing so in that you can check if they were initialized after you define them to avoid potential errors. It is just for a security check. For example, you can do this:

//--- on a global scope
int m_handleRsi; // HANDLE NOT INITIALIZED
OR
int m_handleRsi = INVALID_HANDLE; // HANDLE INITIALIZED


//--- on initialization
m_handleRsi = iRSI(m_symbol, RSI_TF, RSI_PERIOD, RSI_APP_PRICE); // YOU COULD JUST INITIALIZE AND MOVE ON
OR
m_handleRsi = iRSI(m_symbol, RSI_TF, RSI_PERIOD, RSI_APP_PRICE); // YOU COULD INITIALIZE AND CHECK. THIS IS BETTER
if (m_handleRsi == INVALID_HANDLE) {
   Print("Failed to initialize RSI indicator");
   return false;
}

// So now any will work. Let's take an instance where the indicator initialization fails, though rare.
// If there was no check, no indicator will be added and thus strategy logic will be tampered with.
// For the one who checked, the program will terminate, avoiding false strategy. In the OnInit event handler, it will return initialization failed and the program will not run.
// So the user will know something failed and needs to be checked. If you did not check, the program will run but where it needs the failed indicator, the logic will fail. You get it now?
// The Initialization logic looks like this:

int OnInit() {
   if (!(YOUR LOGIC) e.g. m_handleRsi == INVALID_HANDLE) {
      return INIT_FAILED;
   }
   return INIT_SUCCEEDED;
}

Does this make sense now? Thanks.

 
Very detailed content, thanks for sharing it wonderfully!
 

Quote: In this article, we examine the Profitunity System by Bill Williams, breaking down its core components and unique approach to trading within market chaos.

Answer: Profit and loss columns will only exist if your back tested product or the flat market is as good as the forward market you are using against the subsequence portfolio or basket of index that will follow this line of order.

There are some index and newly foundered ETF`s coming out, or that are produced on an increasing basis, as for this intended usage, and will produce these results, profit margins such as the dowjones 30 index as well many other index's which have been created for this intended use. Peter Matty    

Productivity - USA - Fundamental Analysis - Price Charts, Technical and Fundamental Analysis - MetaTrader 5 Help
Productivity - USA - Fundamental Analysis - Price Charts, Technical and Fundamental Analysis - MetaTrader 5 Help
  • www.metatrader5.com
The productivity index measures the output produced for each hour of labor worked. This indicator is useful for predicting inflation and output...
 
peter matty #:

The article is not about profit/loss "columns" or market indices/ETFs. It focuses on the Profitunity System by Bill Williams and how to implement its indicators (Fractals, Alligator, AO, AC) in MQL5.

The discussion here is around coding practices and strategy automation, so keeping to those points will be most helpful for readers.

 
Miguel Angel Vico Alba #:

The article is not about profit/loss "columns" or market indices/ETFs. It focuses on the Profitunity System by Bill Williams and how to implement its indicators (Fractals, Alligator, AO, AC) in MQL5.

The discussion here is around coding practices and strategy automation, so keeping to those points will be most helpful for readers.

Sure