ただ、RSI を細工して並べて表示するだけのインジケータ
とも言えないような 低レベルなもの

くれぐれも方向を勘違いしてトレードしないように

今のところ自分は使う気もなく書き換えや修正をする心算
も無いが、これが役に立つヒトもタクサンいるので・・
ただ、通貨ペアでの比較の方が単純明快な気がするヨ
↓ 【1時間足】の場合

----- 時々再読み込みが必要
//+------------------------------------------------------------------+
//| KJ_rsi.mq4 ..... Test by sSeia
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_buffers 8
//---- input parameters
extern int RSIPeriod=10;
extern int RSIPrice=6;
//---- buffers
double EUR_Buffer[];
double JPY_Buffer[];
double AUD_Buffer[];
double GBP_Buffer[];
double NZD_Buffer[];
double CAD_Buffer[];
double CHF_Buffer[];
double USD_Buffer[];
//----
string pa[] = {
"EURUSD", "USDJPY", "AUDUSD", "GBPUSD", "NZDUSD", "USDCAD", "USDCHF"};
string paz[] = {
" EUR", " JPY", " AUD", " GBP", " NZD", " CAD", " CHF", " USD"};
color Iro[] = {
Red, White, DodgerBlue, LimeGreen, Aqua, DarkGray, Magenta, Yellow};
string NameObj[] = {
"KJ0", "KJ1", "KJ2", "KJ3", "KJ4" , "KJ5", "KJ6", "KJ7", "KJ8", "KJ9", "KJA", "KJTm"};
string Indicator_Name = "KJ_rsi";
int window;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init() {
//---- buffers
// IndicatorBuffers(8);
SetIndexBuffer(0,EUR_Buffer); SetIndexBuffer(1,JPY_Buffer);
SetIndexBuffer(2,AUD_Buffer); SetIndexBuffer(3,GBP_Buffer);
SetIndexBuffer(4,NZD_Buffer); SetIndexBuffer(5,CAD_Buffer);
SetIndexBuffer(6,CHF_Buffer); SetIndexBuffer(7,USD_Buffer);
//----
int j;
for(j=0;j<=7;j++) {
int Style, Width;
if(j>3 && j<7) { Style = 2; Width = 0;}
else { Style = 0; Width = 2;}
SetIndexStyle(j,DRAW_LINE,Style,Width,Iro[j]);
SetIndexLabel(j,NULL);
SetIndexDrawBegin(j,RSIPeriod);
}
//---- name
IndicatorShortName(Indicator_Name);
window = WindowFind(Indicator_Name);
//----
color Lcol = Green;
for(j=8;j<=10;j++) {
ObjectCreate(NameObj[j], OBJ_TREND, window, 0,0, 0,0);
if(j==9) Lcol = RoyalBlue;
if(j==10) Lcol = HotPink;
ObjectSet(NameObj[j], OBJPROP_COLOR, Lcol);
ObjectSet(NameObj[j], OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(NameObj[j], OBJPROP_WIDTH, 0);
}
//----
SetLevelStyle(STYLE_DOT, 0, DarkGray);
SetLevelValue(0, 20);
SetLevelValue(1, 80);
SetLevelValue(2, 40);
SetLevelValue(3, 60);
SetLevelValue(4, 50);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit() {
for(int j=0;j<=11;j++) ObjectDelete(NameObj[j]);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Relative Strength Index |
//+------------------------------------------------------------------+
int start() {
int i, j, counted_bars=IndicatorCounted();
//----
if(Bars<=RSIPeriod) return(0);
int limit=Bars-counted_bars;
for(i=0; i<limit; i++) {
EUR_Buffer[i]=iRSI(pa[0], 0, RSIPeriod, RSIPrice, i);
AUD_Buffer[i]=iRSI(pa[2], 0, RSIPeriod, RSIPrice, i);
GBP_Buffer[i]=iRSI(pa[3], 0, RSIPeriod, RSIPrice, i);
NZD_Buffer[i]=iRSI(pa[4], 0, RSIPeriod, RSIPrice, i);
JPY_Buffer[i]=100 - iRSI(pa[1], 0, RSIPeriod, RSIPrice, i);
CAD_Buffer[i]=100 - iRSI(pa[5], 0, RSIPeriod, RSIPrice, i);
CHF_Buffer[i]=100 - iRSI(pa[6], 0, RSIPeriod, RSIPrice, i);
}
double vt = 0.0;
for(i=0; i<limit; i++) {
vt = EUR_Buffer[i] + AUD_Buffer[i] + GBP_Buffer[i] + NZD_Buffer[i] +
JPY_Buffer[i] + CAD_Buffer[i] + CHF_Buffer[i];
vt = 50 - ( vt + 50.0 )/8;
USD_Buffer[i] = 50.0 + vt;
EUR_Buffer[i] += vt; AUD_Buffer[i] += vt;
GBP_Buffer[i] += vt; NZD_Buffer[i] += vt;
JPY_Buffer[i] += vt; CAD_Buffer[i] += vt;
CHF_Buffer[i] += vt;
}
//----
double b[8];
b[0] = EUR_Buffer[0]; b[1] = JPY_Buffer[0]; b[2] = AUD_Buffer[0];
b[3] = GBP_Buffer[0]; b[4] = NZD_Buffer[0]; b[5] = CAD_Buffer[0];
b[6] = CHF_Buffer[0]; b[7] = USD_Buffer[0];
string sf;
for(j=0;j<=7;j++) {
sf = paz[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) < 15 ) sf = " " + sf;
ObjectSetText(NameObj[j], sf, 15, "Arial", Iro[j]);
}
//----
double g;
int m, s, k, h;
string text;
m = Time[0] + Period()*60 - TimeCurrent();
g = m/60.0;
s = m%60;
m = (m - m%60) / 60;
if (Period() == PERIOD_W1) m -= 24 * 60;
if (Period() <= PERIOD_H1) {
text = " ( " + m + ": " + s + " ) KJ_rsi";
} else {
if (m >= 60) h = m/60;
else h = 0;
k = m - (h*60);
text = " ( " + h + ": " + k + ": " + s + " ) KJ_rsi";
}
ObjectCreate(NameObj[11], OBJ_LABEL, window, 0, 0);
ObjectSetText(NameObj[11], text, 14, "Comic Sans MS", RoyalBlue);
ObjectSet(NameObj[11], OBJPROP_XDISTANCE, 5);
ObjectSet(NameObj[11], OBJPROP_YDISTANCE, 5);
ObjectSet(NameObj[11], OBJPROP_CORNER, 2);
//----
double Lnum = 60.0;
for(j=8;j<=10;j++) {
ObjectSet(NameObj[j], OBJPROP_TIME1, Time[100]);
ObjectSet(NameObj[j], OBJPROP_TIME2, Time[0]);
if(j==9) Lnum = 50.0;
if(j==10) Lnum = 40.0;
ObjectSet(NameObj[j], OBJPROP_PRICE1, Lnum);
ObjectSet(NameObj[j], OBJPROP_PRICE2, Lnum);
}
//----
return(0);
}
//+------------------------------------------------------------------+

言論の自由
雪降りすぎ 


.・・・ってドンダケスキなんだろうにゃ
が米ドルということは、ドルを刷りまくって世界中にばら


