FX で提示される価格は何処でも一緒というわけではない
それでも理屈の上では、
例えば、 EUR/JPY = USD/JPY × EUR/USD
という関係が成り立つ
成り立たなければ、即座に矛盾を突いて鞘取りが実行され
ているハズ・・・凄いよね

指標発表などのイベント時には、スプレッドを広げることで
対応してるのかな
↓ どうでもいいけど、アソビで
あまり意味は無いし厳密なモンじゃないけど、他の2通貨か
ら計算した『計算値』を5通貨分表示するヤツを書いてみた。
FX会社によって提示価格やスプレッドは違うのでこんなの
役に立つとは思わないヨ

でも、なんらかの情報が得られるんじゃないかと思って観察
はする心算
↓ に1時間足の直近データを下段に表示してるけど、値動
きがない時期だから意味がナイ
各社比較すると当たり前だけどゼンゼン違うヨ

//+------------------------------------------------------------------+
//| PD_SAYA.mq4
//| ( Test by sSeia )
//+------------------------------------------------------------------+
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 6
extern int MaxBars = 1000;
extern int MAPeriod=1;
extern int MAPrice=0;
extern int MAMode=0;
//---- buffers
double EURJ_Buffer[];
double AUDJ_Buffer[];
double EURU_Buffer[];
double AUDU_Buffer[];
double USDJ_Buffer[];
double BLine[];
string Pair[] = { "EURJPY", "AUDJPY", "EURUSD", "AUDUSD", "USDJPY"};
color Iro[] = { OrangeRed, DodgerBlue, Violet, Aqua, Gold};
string NameObj[] = { "PDSY_1", "PDSY_2", "PDSY_3", "PDSY_4", "PDSY_5" };
string Indicator_Name = "PD5_SAYA";
int window;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicator buffers mapping
SetIndexBuffer(0,EURJ_Buffer); SetIndexBuffer(1,AUDJ_Buffer);
SetIndexBuffer(2,EURU_Buffer); SetIndexBuffer(3,AUDU_Buffer);
SetIndexBuffer(4,USDJ_Buffer); SetIndexBuffer(5,BLine);
//----
for(int j=0;j<=4;j++) {
SetIndexStyle(j,DRAW_LINE,0,2,Iro[j]);
SetIndexLabel(j,NULL);
}
SetIndexStyle(5,DRAW_LINE,0,1,White);
SetIndexLabel(5,NULL);
//---- name
IndicatorShortName(Indicator_Name);
window = WindowFind(Indicator_Name);
//----
SetLevelStyle(STYLE_DOT, 0, Gray);
SetLevelValue(0, 5);
SetLevelValue(1, 10);
SetLevelValue(2, 20);
SetLevelValue(3, 50);
SetLevelValue(4, -5);
SetLevelValue(5, -10);
SetLevelValue(6, -20);
SetLevelValue(7, -50);
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
void deinit() {
for(int j=0;j<=4;j++) ObjectDelete(NameObj[j]);
Comment("");
}
//--------------------------------------------------------
int start() {
int i, j;
double v1, v2, v3, v4, v5, w1, w2, w3, w4, w5;
int limit = MathMin(MaxBars,Bars);
limit = MathMin(limit,Bars-IndicatorCounted()+1);
if(limit <1) return;
for(i=Bars-1;i>MaxBars;i--) {
EURJ_Buffer[i] = EMPTY_VALUE; AUDJ_Buffer[i] = EMPTY_VALUE;
EURU_Buffer[i] = EMPTY_VALUE; AUDU_Buffer[i] = EMPTY_VALUE;
USDJ_Buffer[i] = EMPTY_VALUE;
}
for(i=limit;i>=0;i--) {
v1 = iMA(Pair[0],NULL,MAPeriod,0,MAMode,MAPrice,i);
v2 = iMA(Pair[1],NULL,MAPeriod,0,MAMode,MAPrice,i);
v3 = iMA(Pair[2],NULL,MAPeriod,0,MAMode,MAPrice,i);
v4 = iMA(Pair[3],NULL,MAPeriod,0,MAMode,MAPrice,i);
v5 = iMA(Pair[4],NULL,MAPeriod,0,MAMode,MAPrice,i);
w1 = v1 - v3 * v5; w2 = v2 - v4 * v5;
w3 = v3 - v1 / v5; w4 = v4 - v2 / v5;
w5 = v5 - v1 / v3;
EURJ_Buffer[i] = w1 * 100; AUDJ_Buffer[i] = w2 * 100;
EURU_Buffer[i] = w3 * 10000; AUDU_Buffer[i] = w4 * 10000;
USDJ_Buffer[i] = w5 * 100; BLine[i] = 0.0;
}
//----
double b[5];
b[0] = EURJ_Buffer[0]; b[1] = AUDJ_Buffer[0]; b[2] = EURU_Buffer[0];
b[3] = AUDU_Buffer[0]; b[4] = USDJ_Buffer[0];
string sf[5];
for(j=0;j<=4;j++) {
double pq = b[j];
sf[j] = DoubleToStr( pq, 2);
}
for(j=0;j<=4;j++) {
ObjectCreate(NameObj[j], OBJ_TEXT, window, 0, 0);
ObjectSet(NameObj[j], OBJPROP_TIME1, Time[0]);
ObjectSet(NameObj[j], OBJPROP_PRICE1, b[j]);
while (StringLen(sf[j]) < 30 ) sf[j] = " " + sf[j];
ObjectSetText(NameObj[j], sf[j], 12, "Arial", Iro[j]);
}
//----
return(0);
}
//+------------------------------------------------------------------+