Assista a como baixar robôs de negociação gratuitos
Encontre-nos em Twitter!
Participe de nossa página de fãs
Script interessante?
Coloque um link para ele, e permita que outras pessoas também o avaliem
Você gostou do script?
Avalie seu funcionamento no terminal MetaTrader 5
Indicadores

Divergence Awesome Ocilator - indicador para MetaTrader 5

Visualizações:
624
Publicado:
2025.03.07 20:00
Atualizado:
2025.03.17 18:11
Freelance MQL5 Precisa de um robô ou indicador baseado nesse código? Solicite-o no Freelance Ir para Freelance

This MQL5 code is a custom indicator designed to detect and visualize divergences between price action and the Awesome Oscillator (AO). Divergences occur when the price movement and the oscillator movement are not aligned, often signaling potential reversals or continuations in the market. The indicator plots buy/sell signals, a histogram of the AO, and trendlines to highlight these divergences.

divergence ao buying

 


Key Features of the Indicator:

  1. Divergence Detection:

    • Detects bullish divergences (price makes lower lows while AO makes higher lows).
    • Detects bearish divergences (price makes higher highs while AO makes lower highs).
  2. Visualization:

    • Buy/Sell Arrows: Plots arrows on the chart to indicate potential buy or sell signals based on divergences.
    • Histogram: Displays the Awesome Oscillator (AO) values as a histogram.
    • Trendlines: Draws trendlines on the chart to highlight the divergences between price and AO.
  3. Custom Buffers:

    • Uses four buffers to store data:
      • BuyBuffer and SellBuffer for buy/sell signals.
      • HistogramBuffer for AO values.
      • PointsCounterBuffer to track aligned points for divergence confirmation.
  4. Dynamic Trendline Drawing:

    • Uses CChartObjectTrend to dynamically draw trendlines on the chart for price and AO.
  5. Crossing Check:

    • Includes a function ( CheckCrossing ) to verify if the price or AO crosses a trendline, which helps confirm or invalidate a divergence.
  6. Interpolation:

    • Uses linear interpolation ( CalculateIntermediateValue ) to calculate intermediate values between two points, which is used to check for crossings.

How It Works:

  1. Initialization:

    • The OnInit() function sets up the indicator buffers, assigns properties (e.g., colors, styles), and initializes the Awesome Oscillator (AO) handle.
  2. Main Calculation:

    • The OnCalculate() function processes price and AO data to detect divergences:
      • Identifies bottoms (lower lows) and tops (higher highs) in both price and AO.
      • Checks for divergences by comparing price and AO trends.
      • Plots buy/sell signals and draws trendlines when a divergence is confirmed.
  3. Divergence Confirmation:

    • Uses conditions like IsBullishTrend and IsBearishTrend to confirm divergences.
    • Ensures no crossing occurs between the price and AO trendlines to validate the divergence.
  4. Dynamic Updates:

    • The indicator dynamically updates with each new bar, recalculating divergences and redrawing trendlines as needed.

Key Functions:

  1. IsBottom() and IsTop() :

    • Detect local minima (bottoms) and maxima (tops) in an array (price or AO).
  2. CheckCrossing() :

    • Checks if the price or AO crosses a trendline, which can invalidate a divergence.
  3. CalculateIntermediateValue() :

    • Calculates intermediate values using linear interpolation for trendline analysis.
  4. AddUniqueCoordinates() :

    • Ensures unique coordinates are added to the array for trendline drawing.
  5. TotalAligned() :

    • Counts the number of aligned points to confirm divergence strength.

Usage:

  • This indicator is useful for traders who rely on divergence strategies to identify potential reversals or continuations in the market.
  • It provides visual cues (arrows, trendlines, and histograms) to help traders make informed decisions.

Example Scenario:

  • If the price is making lower lows (bearish), but the AO is making higher lows (bullish), a bullish divergence is detected. The indicator will plot a buy arrow and draw trendlines to highlight the divergence.
  • Conversely, if the price is making higher highs (bullish), but the AO is making lower highs (bearish), a bearish divergence is detected. The indicator will plot a sell arrow and draw trendlines.

Technical Details:

  • Platform: MetaTrader 5 (MT5).
  • Language: MQL5.
  • Dependencies: Uses the Awesome Oscillator ( iAO ) for calculations.
  • Custom Objects: Utilizes CChartObjectTrend for drawing trendlines and CArrayInt for managing arrays of coordinates.

This indicator is a powerful tool for traders who want to automate divergence detection and visualization, saving time and improving accuracy in their trading strategies.

Better volume Better volume

O Better Volume é um indicador avançado projetado para analisar o comportamento do volume em gráficos de preços. Ele combina informações de volume com métricas como a amplitude dos candles (range) e médias móveis para identificar padrões importantes no mercado, como clímax de compra/venda, churn e candles fracos. Com sua interface visual dinâmica e categorização de volume, o indicador oferece insights valiosos para traders que desejam tomar decisões informadas com base no fluxo de volume.

Candle Counter Candle Counter

O Candle counter é uma ferramenta poderosa e versátil projetada para ajudar traders a visualizar e analisar a sequência de barras em seus gráficos. Este indicador numera automaticamente cada vela no gráfico com base nas preferências definidas pelo usuário, facilitando o acompanhamento de velas específicas, a identificação de padrões e a implementação de estratégias de negociação precisas.

Tendência Diária Tendência Diária

Indicador que exibe a tendência do dia em qualquer tempo gráfico. É possível customizar as cores e a posição do texto na tela.

Rompimentos Falsos Rompimentos Falsos

O indicador "RompimentosFalsos.mq5" é uma ferramenta para o MetaTrader 5 que identifica e marca visualmente pontos de compra e venda com base em rompimentos falsos de suportes e resistências. Ele utiliza buffers para exibir setas de compra (azul) e venda (vermelha), além de linhas para suportes (azul) e resistências (vermelha), e setas adicionais para topos e fundos do mercado. A lógica principal do indicador consiste em detectar topos e fundos com base nos preços máximos e mínimos dos candles, atualizando dinamicamente os níveis de suporte e resistência. Quando o preço rompe um suporte ou resistência e depois retorna, o indicador gera sinais de compra ou venda, respectivamente. É uma ferramenta útil para traders que operam com estratégias baseadas em rompimentos falsos.