CHF_CORR_EUR_v1
Download scriptThis tool is designed to help traders identify potential trading opportunities on the EUR/USD currency pair by analyzing the real-time price movements of the USD/CHF pair. It operates on the principle of "correlation," where it looks for specific price shifts in one market to predict a corresponding move in another.
How the Logic Works
The script constantly monitors the 1-minute price action of the USD/CHF currency pair. Specifically, it measures the distance between the current closing price and the opening price of each individual one-minute candle.
The core logic follows these steps:
- Price Difference Calculation: For every minute that passes, the tool calculates how much the USD/CHF price has moved from its starting point (the open) to its ending point (the close).
- Movement Thresholds: The script looks for significant "pips" of movement. If the price moves beyond a specific threshold in either direction within that one-minute window, it triggers a signal.
- Buy Signals: If the USD/CHF price drops significantly (specifically, a downward move greater than 6 pips), the tool interprets this as a signal to consider a "Buy" position on the EUR/USD pair.
- Sell Signals: Conversely, if the USD/CHF price rises significantly (an upward move greater than 6 pips), the tool interprets this as a signal to consider a "Sell" position on the EUR/USD pair.
User Experience and Alerts
To ensure the trader sees these opportunities immediately, the script provides two types of feedback:
- Visual Comments: The tool writes text directly onto the trading chart screen, displaying the calculated price difference and the specific recommendation (Buy or Sell).
- Audible/Pop-up Alerts: When a significant move is detected that meets the criteria, the script triggers an active alert notification. This is designed to grab the trader's attention instantly so they can react to the price movement in real-time.
In summary, this script acts as a secondary scanner; it watches the USD/CHF market for "explosive" 1-minute movements and tells you when it is likely time to take an opposite action on the EUR/USD pair.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| Correlation USDCHF/EURUSD .mq4 |
//| Copyright © 2005, Yuri Makarov. |
//| http://mak.tradersmind.com |
//+------------------------------------------------------------------+
//Correlates chf prive ON eur 1 min chart
// if chf bar (1 min) is greater than 3 pips it recommends sell/buy eur
//
#property copyright "Copyright © 2005, Perky_z."
#property link "Perky_z@yahoo.com"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 OrangeRed
extern string Curency = "CHF";
double UsdChf[],UsdChfO[];
double Idx[];
double diff,diff1;
int init()
{
IndicatorShortName(Curency);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,Idx);
return(0);
}
void start()
{
//I've put the period statement in - this means that
// you can get close for other periods onto the current chart
ArrayCopySeries(UsdChf,MODE_CLOSE,"USDCHF",PERIOD_M1);
ArrayCopySeries(UsdChfO,MODE_OPEN,"USDCHF",PERIOD_M1);
int counted_bars=IndicatorCounted();
double USD;
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
int limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
{
diff=(UsdChf[i]-UsdChfO[i]);
diff1=(UsdChf[i+1]-UsdChfO[i+1]);
Comment("Before",diff1,"\nnow ",diff);
if (Curency == "CHF") Idx[i] = UsdChf[i];
if (diff<=-0.0006 && diff<0)
{
Comment("diff ",diff," Buy eur");
Alert ("USDCHF ",diff," Difference BUY EURUSD");
}
if (diff>=0.0006 && diff>0)
{
Comment("diff ",diff," Sell eur");
Alert ("USDCHF ",diff," Difference SELL EURUSD");
}
if (Curency == "CHF") Idx[i] = UsdChf[i];
}
}
Comments