HiLo_Activator

Download script
Author: Poul Trade Forum
HiLo_Activator

How the HoLo Activator Works

The HoLo Activator is a visual trading tool designed to help identify trend reversals and potential entry points by monitoring the relationship between current market prices and moving averages of high and low price points. Rather than simply following the standard closing price, this script looks at the extremes of the price action to determine when the momentum is shifting.

Core Logic and Mechanics

The indicator operates by calculating two distinct smoothed values based on a user-defined period (set by the "R" parameter). One value tracks the Highest Highs over a specific timeframe, while the other tracks the Lowest Lows. By using these extremes instead of just the standard price, the tool attempts to filter out minor market "noise" and focus on more significant structural shifts.

How it Identifies Signals

The script continuously compares the previous candle's closing price against these two calculated moving averages:

  • Bullish Identification: If the market price closes above the average of the "Highs," the logic recognizes a potential shift toward an upward trend. When this occurs, the indicator places a visual marker on the chart.
  • Bearish Identification: Conversely, if the market price closes below the average of the "Lows," the logic recognizes a potential shift toward a downward trend, triggering a corresponding visual marker in the opposite direction.

Visual Presentation

To make these signals easy to read for the trader, the script translates these mathematical conditions into clear on-screen symbols:

  • Blue Markers: These appear when the logic detects a bullish crossover, suggesting upward momentum.
  • Red Markers: These appear when the logic detects a bearish crossover, suggesting downward momentum.

By automating the detection of these specific price breaches, the HoLo Activator provides a streamlined way to visualize where the market "activates" a new direction, allowing traders to see potential trend changes at a glance without having to manually calculate moving averages.

Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
12 Views
0 Downloads
0 Favorites
HiLo_Activator
//+------------------------------------------------------------------+
//|                                               HoLo Activator.mq4 |
//|                               Copyright © 2004, Poul_Trade_Forum |
//|                                                         Aborigen |
//|                                          http://forex.kbpauk.ru/ |
//+------------------------------------------------------------------+
#property copyright "Poul Trade Forum"
#property link      "http://forex.kbpauk.ru/"
#property indicator_chart_window
#property indicator_buffers 2
//---- input parameters
extern int R=3;
//---- buffers
double HighBuffer[];
double LowBuffer[];
double VALUE1,VALUE2,VALUE11,VALUE22;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   string short_name;
//---- indicator line
   SetIndexStyle(0,DRAW_ARROW,EMPTY,1,Blue);
   SetIndexStyle(1,DRAW_ARROW,EMPTY,1,Red);
   SetIndexArrow(0, 0x9F);
   SetIndexArrow(1, 0x9F);
   SetIndexBuffer(0,HighBuffer);
   SetIndexBuffer(1,LowBuffer);
   SetIndexEmptyValue(0,0);
   SetIndexEmptyValue(1,0);
//---- name for DataWindow and indicator subwindow label
   short_name="HiLo";
   IndicatorShortName(short_name);
   SetIndexLabel(0,short_name);
//----
   SetIndexDrawBegin(0,10);
   SetIndexDrawBegin(1,10);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here
   ObjectsDeleteAll(0);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted(),i,shift,Swing;
//---- TODO: add your code here
   i=(Bars-counted_bars)-1;
//----
   for(shift=i; shift>=0;shift--)
     {
      VALUE1=iMA(NULL,0,R,0,MODE_SMA,PRICE_HIGH,shift+1);
      VALUE2=iMA(NULL,0,R,0,MODE_SMA,PRICE_LOW,shift+1);
//----
      if (Close[shift+1]<VALUE2)Swing=-1;
      if (Close[shift+1]>VALUE1)Swing=1;
      if (Swing==1) { HighBuffer[shift]=VALUE2; LowBuffer[shift]=0;  }
      if (Swing==-1) { LowBuffer[shift]=VALUE1; HighBuffer[shift]=0; }
      //----
     }
   return(0);
  }
//+------------------------------------------------------------------+

Comments