Author: Copyright � 2007, MetaQuotes Software Corp.
BSI1

This script functions as a specialized market analysis tool designed to visualize the relationship between three specific currency pairs—GBPUSD, EURUSD, and USDCHF—to identify potential buying or selling opportunities based on their collective momentum.

Core Operational Logic

The indicator operates by monitoring the data from an external technical signal (the "JRSX" indicator) for these three specific pairs simultaneously. Instead of looking at each currency in isolation, the tool aggregates their movements to determine a broader market sentiment.

1. Data Collection and Benchmarking The script pulls real-time values for GBPUSD, EURUSD, and USDCHF. It specifically evaluates where these values sit in relation to a central "neutral" threshold of 50. In this context, the position relative to 50 acts as a barometer for the strength or weakness of each individual currency pair's trend.

2. The Scoring System (Trigger Logic) The script assigns a weight to each currency pair based on whether it is performing above or below that 50-point threshold:

  • If a pair is below the threshold, it contributes a negative value to the total calculation.
  • If a pair is above the threshold, it contributes a positive value.

By totaling these scores, the script creates a "Voting System." For example, if two pairs are showing strength and one is showing weakness, the final score reflects that imbalance.

3. Signal Generation The tool translates these combined scores into visual "Buy" or "Sell" signals on your chart:

  • Buy Signal: If the combined momentum of the three pairs reaches a specific high positive threshold (indicating significant collective strength), a "Buy" signal is triggered at the 50 level.
  • Sell Signal: If the combined momentum falls below a specific negative threshold (indicating significant collective weakness), a "Sell" signal is triggered at the 50 level.
  • Neutral Zone: If the momentum is balanced and does not meet these extreme thresholds, no signal is displayed, helping to filter out periods of market indecision or low-impact movement.

Summary for the User

Essentially, this tool acts as a "consensus meter." It looks at three major currency relationships to see if they are moving in harmony. When all three show enough unified strength in one direction, the indicator highlights a potential entry point, allowing you to see broader market trends rather than just the noise of a single currency pair.

Miscellaneous
Implements a curve of type %1
9 Views
0 Downloads
0 Favorites
BSI1
//+------------------------------------------------------------------+
//|                                                          BSI.mq4 |
//|                      Copyright © 2007, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_separate_window
#property indicator_buffers 5
#property indicator_color1 Yellow
#property indicator_color2 Lime
#property indicator_color3 DeepPink
#property indicator_color4 Blue
#property indicator_width4 5
#property indicator_color5 Red
#property indicator_width5 5
#property indicator_level1 50

//---- buffers
double BUY[];
double SELL[];
double GBPUSD[];
double EURUSD[];
double USDCHF[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,GBPUSD);

   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,EURUSD);

   SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(2,USDCHF);

   SetIndexStyle(3,DRAW_LINE);
   SetIndexBuffer(3,BUY);

   SetIndexStyle(4,DRAW_LINE);
   SetIndexBuffer(4,SELL);

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    i, j, counted_bars=IndicatorCounted();
//----
   i=Bars-counted_bars;
   while(i>=0)
   {
     GBPUSD[i]=iCustom("GBPUSD",0,"JRSX",3,0,i);
     EURUSD[i]=iCustom("EURUSD",0,"JRSX",3,0,i);
     USDCHF[i]=iCustom("USDCHF",0,"JRSX",3,0,i);
     int GU_Trig=1,EU_Trig=1,UC_Trig=1,vTrig;
     if(GBPUSD[i]<50)GU_Trig=-1;
     if(EURUSD[i]<50)EU_Trig=-1;
     if(USDCHF[i]<50)UC_Trig=-1;
     vTrig=GU_Trig+EU_Trig-UC_Trig;
     if(vTrig>2)
     {
       BUY[i]=50;
       SELL[i]=EMPTY_VALUE;
     } else 
     if(vTrig<-2)
     {
       BUY[i]=EMPTY_VALUE;
       SELL[i]=50;
     }
     else 
     {
       BUY[i]=EMPTY_VALUE;
       SELL[i]=EMPTY_VALUE;
     }
     i--;
   }
   
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments