BykovTrend_Sig

Download script
BykovTrend_Sig

This tool is designed to act as a visual trend signal guide, identifying specific moments where market momentum shifts from bearish to bullish (or vice versa). It translates complex price movements into clear, actionable signals displayed directly on your trading chart.

How the Logic Works

The script functions by monitoring the "momentum" of the market over a set period. Instead of just looking at whether the price is going up or down, it calculates the relationship between the current price and its recent high/low range to determine the strength of the trend.

1. Monitoring Momentum Strength The tool uses a specific calculation (the WPR) to track where the current price sits within its recent historical range. It looks for extreme levels:

  • When the momentum drops significantly into "oversold" territory, it prepares for a potential upward shift.
  • When the momentum rises significantly into "overbought" territory, it prepares for a potential downward shift.

2. Identifying Trend Reversals The core logic relies on detecting a "flip" in these momentum states. The script continuously compares the current state of the market to its previous state. It is specifically looking for the exact moment the trend crosses a defined threshold:

  • Bullish Signals: If the momentum was previously showing weakness but suddenly breaks above a specific positive threshold, the tool identifies this as a potential upward trend shift.
  • Bearish Signals: If the momentum was previously showing strength but suddenly drops below a specific negative threshold, the tool identifies this as a potential downward trend shift.

3. Visual Output Once the logic detects these specific "flips" in momentum, it places visual markers on your chart:

  • Buy/Up Signals: These appear as arrows placed slightly below the candle's low price, highlighting where the tool believes the trend has turned positive.
  • Sell/Down Signals: These appear as arrows placed slightly above the candle's high price, highlighting where the tool believes the trend has turned negative.

Summary for Traders

Essentially, this script filters out the "noise" of minor price fluctuations to highlight major shifts in market sentiment. It tells you when the momentum has shifted enough to justify a potential change in direction, providing clear visual cues to help you stay aligned with the dominant trend.

Indicators Used
Larry William percent range indicator
Miscellaneous
Implements a curve of type %1
11 Views
0 Downloads
0 Favorites
BykovTrend_Sig
//+------------------------------------------------------------------+
//| BykovTrend_Sig.mq4 
//| Ramdass - Conversion only
//+------------------------------------------------------------------+

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Magenta
#property indicator_color2 Aqua

//---- input parameters
extern int RISK=3;
extern int SSP=9;
extern int CountBars=500;

//---- buffers
double val1[];
double val2[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   string short_name;
//---- indicator line
   IndicatorBuffers(2);
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,234);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1,233);
   SetIndexBuffer(0,val1);
   SetIndexBuffer(1,val2);

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| BykovTrend_Sig                                                   |
//+------------------------------------------------------------------+
int start()
  {   
   SetIndexDrawBegin(0,Bars-CountBars+SSP+1);
   SetIndexDrawBegin(1,Bars-CountBars+SSP+1);
   int i,counted_bars=IndicatorCounted();
   int K;
   bool uptrend,old;
   double wpr;
   
   K=33-RISK;
//----
   if(Bars<=SSP+1) return(0);
//---- initial zero
   if(counted_bars<SSP+1)
   {
      for(i=1;i<=0;i++) val1[CountBars-i]=0.0;
      for(i=1;i<=0;i++) val2[CountBars-i]=0.0;
   }
//----
   i=CountBars-SSP-1;
   if(counted_bars>=SSP+1) i=CountBars-counted_bars-1;
   while(i>=0)
     {
     
   wpr=iWPR(NULL,0,SSP,i);
   val1[i]=0.0; val2[i]=0.0;
   if (wpr<-100+K) uptrend=false;
   if (wpr>-K) uptrend=true;
   if ((! uptrend==old) && uptrend==true) {val2[i]=Low[i]-5*Point;}
   if ((! uptrend==old) && uptrend==false) {val1[i]=High[i]+5*Point;}
   old=uptrend;
      
      i--;
     }
   return(0);
  }
//+------------------------------------------------------------------+

Comments