WPR G-J
Download scriptThis script is designed as a specialized visual tool for the MetaTrader platform, intended to help traders identify potential market reversal points or trend shifts by analyzing multiple currency pairs simultaneously. Rather than looking at just one chart, the logic works by cross-referencing data from two different financial instruments to confirm a signal.
Core Operational Logic
The tool functions by monitoring specific technical indicators (specifically a "WPRfast" oscillator) across two distinct currency pairings: GBP/USD and GBPJPY. It looks for specific "agreement" between these two markets to determine when to display a signal on your current chart.
The logic follows a two-step verification process:
-
Upward Signal Identification: The script monitors the oscillator values of both currency pairs. If both pairs simultaneously reach a specific positive threshold, the tool identifies this as a potential bullish move. When this condition is met, it places a visual marker (an arrow) above the high price of the current candle.
-
Downward Signal Identification: Conversely, the script monitors whether both currency pairs have dropped below a specific negative threshold at the same time. If both markets are "oversold" or showing synchronized downward momentum, the tool identifies a potential bearish move and places a visual marker (an arrow) below the low price of the current candle.
Key Features
- Multi-Pair Correlation: Instead of relying on the price action of a single chart, this script uses a "consensus" model. It requires both the GBP/USD and GBPJPY markets to agree before it triggers a signal, which helps in filtering out some of the market noise found in individual currency movements.
- Visual Execution: The tool is designed to be clean and easy to read. It does not clutter the screen with lines; instead, it only renders specific arrows at the exact moments where both technical conditions are satisfied.
- Historical Analysis: The script scans through a significant amount of historical data (up to 3,500 bars), allowing traders to see past signals and understand how the logic performed during previous market cycles.
In summary, this is a correlation-based signaling tool. It simplifies complex multi-chart analysis into simple visual cues on your main trading screen, highlighting moments where two major currency pairs align in their momentum.
//+------------------------------------------------------------------+
//| äâà G-J .mq4 |
//| Copyright © 2009, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 White
#property indicator_color2 Blue
//---- input parameters
extern int P = 14;
extern int n1 = 14;
extern int n2 = 14;
extern int CountBars=3500;
//---- buffers
double val1[];
double val2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- indicator line
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_ARROW, EMPTY);
SetIndexArrow(0,108);
SetIndexBuffer(0,val1);
SetIndexEmptyValue(0,0.0);
SetIndexStyle(1,DRAW_ARROW, EMPTY);
SetIndexArrow(1,108);
SetIndexBuffer(1,val2);
SetIndexEmptyValue(1,0.0);
//----
return(0);
}
//+------------------------------------------------------------------+
//| AltrTrend_Signal_v2_2 |
//+------------------------------------------------------------------+
int start()
{ double F_u_EUR,F_u_GBP,F_d_EUR,F_d_GBP;
int limit;
int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
{
F_u_EUR=iCustom("GBPUSD",15,"WPRfast",P,n1,n2,3000,0,i);
F_d_EUR=iCustom("GBPUSD",15,"WPRfast",P,n1,n2,3000,1,i);
F_u_GBP=iCustom("GBPJPY",15,"WPRfast",P,n1,n2,3000,0,i);
F_d_GBP=iCustom("GBPJPY",15,"WPRfast",P,n1,n2,3000,1,i);
if (F_u_EUR>0&&F_u_GBP>0)
{
val1[i]=High[i]+35*Point;
}
if (0>F_d_EUR&&0>F_d_GBP)
{
val2[i]=Low[i]-35*Point;
}
}
return(0);
}
//+------------------------------------------------------------------+
Comments