How to create a Bears Power EA with MQL5

video
play-sharp-fill

 

  • Introduction and Objective:
    • The tutorial is focused on creating an expert advisor that utilizes the Bears Power oscillator. This oscillator helps determine the strength of the bears in the market. The largest value of the oscillator during the day can indicate a potential price surge.
  • Initial Setup in MetaEditor:
    • Users are instructed to open the MetaEditor by clicking a specific icon or pressing the F4 key.
    • A new file is initiated within the MetaEditor, named “simple bears power”.
  • Array Creation and Initialization:
    • An array, “price data”, is established to store price data for the last three candles.
    • The copyrates function is used to populate the array with price data.
  • Bears Power Definition and Calculation:
    • The Bears Power oscillator is defined using the built-in function. It calculates based on the last thirteen candles.
    • An array, “mypricearray”, is set up to store the Bears Power values.
  • Signal Generation and Logic:
    • The expert advisor evaluates the Bears Power values. The oscillator’s value is displayed on the MetaTrader chart, and its interpretation can help determine potential price movements.
  • Testing and Visualization:
    • After coding, users are advised to compile the code.
    • The functionality is then tested in MetaTrader using the strategy tester, with visualization providing a real-time view of the expert advisor in action.
  • Conclusion and Further Learning:
    • The tutorial showcases the expert advisor’s capability to effectively trade based on the Bears Power oscillator in MQL5. The oscillator was created by Alexander Elder, known for his book “Trading for a Living”. It’s recommended to use the indicator in conjunction with a trend indicator like a moving average.

By following this tutorial, users can effectively create an expert advisor that trades based on the Bears Power oscillator, allowing for informed trading decisions based on the oscillator’s signals.


Video Timestamps

  • 0:00 – Introduction to the Bear’s power oscillator and its significance in trading.
  • 0:30 – Explanation of the oscillator’s ability to measure the strength of the Bears in the market.
  • 1:00 – Background on the creation of the Bear’s power oscillator by Dr. Alexander Elder.
  • 1:30 – Steps to create an Expert Advisor in MQL5 using the Bear’s power oscillator.
  • 2:00 – Setting up the Expert Advisor in MetaEditor and initializing the code.
  • 2:30 – Defining the properties of the Bear’s power oscillator and creating a price array.
  • 3:00 – Sorting the price array and filling it with data.
  • 3:30 – Calculating the Bear’s power value for the current candle and displaying it on the chart.
  • 4:00 – Compiling the Expert Advisor and testing it in MetaTrader.
  • 4:30 – Observing the Bear’s power oscillator’s movement on the chart.
  • 5:00 – Conclusion on creating an Expert Advisor using the Bear’s power oscillator with MQL5 code.

Related Questions and Answers:

  1. What is the primary focus of the tutorial?
    • The tutorial is centered on the Bears Power oscillator and its application in creating an expert advisor in MQL5. The Bears Power oscillator helps determine the strength of the bears in the market.
  2. How can users access the MetaEditor for coding?
    • Users can open the MetaEditor by clicking on a specific icon or pressing the F4 key.
  3. What is the purpose of the “simple bears power” file in MetaEditor?
    • The “simple bears power” file is initiated within the MetaEditor to code and develop the expert advisor that trades based on the Bears Power oscillator signals.
  4. How is the array named “price data” utilized in the tutorial?
    • The “price data” array is designed to store price data for the last three candles. It is populated using the copyrates function.
  5. How is the Bears Power oscillator defined and calculated in the tutorial?
    • The Bears Power oscillator is defined using a built-in function and is calculated based on the last thirteen candles. An array named “mypricearray” is set up to store the Bears Power values.
  6. How does the expert advisor generate trading signals based on the Bears Power oscillator?
    • The expert advisor evaluates the Bears Power values. The oscillator’s value is displayed on the MetaTrader chart, and its interpretation can help traders determine potential price movements.
  7. How are the results of the expert advisor displayed to the user?
    • The results, including the oscillator’s value, are displayed directly on the MetaTrader chart.
  8. What steps should be taken after coding the expert advisor?
    • After coding, users should compile the code. The functionality is then tested in MetaTrader using the strategy tester, with a visual mode providing a real-time view of the expert advisor in action.
  9. Who created the Bears Power oscillator and how is it best used in trading?
    • The Bears Power oscillator was developed by Alexander Elder, known for his book “Trading for a Living”. It’s recommended to use the indicator in conjunction with a trend indicator like a moving average.
  10. What can users achieve by following this tutorial?
  • By following this tutorial, users can effectively create an expert advisor that trades based on the Bears Power oscillator, allowing for informed trading decisions based on the oscillator’s signals.