Attachments forums

List of attachments posted on this forum.


All files on forums: 159903

Re: Something interesting from Chatgpt/AI please post here

JohnL33, Tue Jul 22, 2025 12:13 am

JohnL33 wrote: Sun Jul 06, 2025 4:01 pm A! Extreme_Pullback

1. High-Level Summary
Name: A! Extreme_Pullback.mq4
Type: MT4 Indicator
Function: It is a scanner and dashboard. It does not draw continuous lines like a moving average. Instead, it scans multiple currency pairs and timeframes for a specific trading signal and displays the results as a text list on your chart. It can also provide pop-up alerts and draw arrows for confirmed signals.
Core Strategy: The indicator looks for pullbacks to Bollinger Bands in an established trend, which is defined by a long-term Exponential Moving Average (EMA).
2. The Core Trading Strategy
The indicator's logic is divided into a Setup condition and optional Confirmation conditions.
Setup Condition (Checked on the most recently closed candle, bar 1)
The indicator first identifies a potential setup on the candle that has just finished forming.

Buy Setup:
The long-term trend is considered UP. This is determined by the price being above the EMA_Period (e.g., 200 EMA). The specific check is ema_value_1 < low_1, meaning the entire candle is above the EMA.
There is a sharp pullback. This is identified when the low of the candle (low_1) touches or breaks below the lower Bollinger Band (bb_lower_1).
In short: The market is in an uptrend, but the price has pulled back aggressively to an extreme level (the lower band).

Sell Setup:
The long-term trend is considered DOWN. This is determined by the price being below the EMA_Period. The specific check is ema_value_1 > high_1, meaning the entire candle is below the EMA.
There is a sharp pullback (rally). This is identified when the high of the candle (high_1) touches or breaks above the upper Bollinger Band (bb_upper_1).
In short: The market is in a downtrend, but the price has rallied aggressively to an extreme level (the upper band).
Confirmation Conditions (Optional, checked on the current forming candle, bar 0)
If a setup is found, the indicator can optionally wait for further confirmation before generating a signal.

RSI Filter (Require_RSI_Filter):
For a Buy signal, the RSI on the setup candle must be in the "Oversold" zone (e.g., below 30).
For a Sell signal, the RSI on the setup candle must be in the "Overbought" zone (e.g., above 70).

Candle Confirmation (Require_Candle_Confirmation):

This is a crucial detail: this confirmation is checked on the current, live candle (shift = 0).
For a Buy signal, the current candle must form a Bullish Pin Bar (also known as a Hammer), indicating buying pressure is returning.
For a Sell signal, the current candle must form a Bearish Pin Bar (also known as a Shooting Star), indicating selling pressure is returning.
A signal is only displayed/alerted when the Setup is valid AND all enabled Confirmation conditions are met.
The Fix
You've correctly identified a common issue in MQL4 indicators that manage their own graphical objects. When the indicator re-initializes (which happens when you change timeframes, edit settings, or recompile the code), the OnInit() function runs again.

NOW no more old objects,Only new one is drawn.
All files in topic