Indicators Used
Miscellaneous
0
Views
0
Downloads
0
Favorites
MultiCCI_PRICE
//+------------------------------------------------------------------+
//| MultiCCI PRICE.mq4 |
//| Copyright © 2009, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, MetaQuotes Software Corp."
#property link "http://www.mql4.com/ru/users/costy_"
#property indicator_separate_window
#property indicator_buffers 8
extern string xxxxxxxxxxxxxxxxxxxõxxxxxxxxxx = "---------------------------------------------------------";
extern string Õ="Êîýô. Øóìà ";
extern int X=3;
extern string Ò="Òàéìôðåéì 0-òåêóùèé";
extern int T=0;
extern string xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = "---------------------------------------------------------";
extern string PEriod="Ïåðèîä ÑÑI";
extern int Ïåðèîä= 55;
extern string xxxxxxxxxxxxxxxxxxxxxxxxxxxxxõ = "---------------------------------------------------------";
extern string Ìåòîä_âû÷èñëåíèÿ = "0 Ïðîñò 1 Ýêñ 2 Ñãë 3 Ëèí-âçâåøåííîå";
extern int Ìåòîä_Âû÷èñëåíèÿ=0;
extern string xxõxxxxxxxxxxxxxxxxxxxxxxxxxxõ = "---------------------------------------------------------";
extern string Èñïîëüçóåìàÿ_öåíà = "0CLOSE,1OPEN,2HIGH,3LOW,4MEDIAN,5TYPICAL";
extern int Èñïîëüçóåìàÿ_öeíà=4;
//----
double ma1_buffer [];double ma2_buffer [];double ma3_buffer [];double ma4_buffer [];
double ma5_buffer []; double ma6_buffer []; double ma7_buffer [];
extern color Color1 = Red;extern color Color2 = Chocolate;extern color Color3 = Orange;
extern color Color4 = ForestGreen;extern color Color5 = RoyalBlue;extern color Color6 = Blue;
extern color Color7 = Fuchsia;
string Short;
int init()
{
//----
SetIndexBuffer(0, ma1_buffer); SetIndexBuffer(1, ma2_buffer); SetIndexBuffer(2, ma3_buffer);
SetIndexBuffer(3, ma4_buffer); SetIndexBuffer(4, ma5_buffer); SetIndexBuffer(5, ma6_buffer);
SetIndexBuffer(6, ma7_buffer);
if(WindowFind("MultiCCI PRICE #1")>0)Short="MultiCCI PRICE #2";
else Short="MultiCCI PRICE #1";
IndicatorShortName(Short);
return(0);
}
//+------------------------------------------------------------------+
int deinit()
{
//----
return(0);
}
//+------------------------------------------------------------------+
int start(){
int pos = Bars-IndicatorCounted() ;
if(IndicatorCounted()==0) pos--;
while(pos >= 0)
{ ma1_buffer[pos] = (iMA("GBPJPY", T , X, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos)-iMA("GBPJPY", T , Ïåðèîä, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos))/Point;
ma2_buffer[pos] = (iMA("NZDJPY", T , X, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos)-iMA("NZDJPY", T , Ïåðèîä, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos))/Point;
ma3_buffer[pos] = (iMA("AUDJPY", T , X, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos)-iMA("AUDJPY", T , Ïåðèîä, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos))/Point;
ma4_buffer[pos] = (iMA("CHFJPY", T , X, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos)-iMA("CHFJPY", T , Ïåðèîä, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos))/Point;
ma5_buffer[pos] = (iMA("EURJPY", T , X, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos)-iMA("EURJPY", T , Ïåðèîä, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos))/Point;
ma6_buffer[pos] = (iMA("CADJPY", T , X, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos)-iMA("CADJPY", T , Ïåðèîä, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos))/Point;
ma7_buffer[pos] = (iMA("USDJPY", T , X, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos)-iMA("USDJPY", T , Ïåðèîä, 0, Ìåòîä_Âû÷èñëåíèÿ, Èñïîëüçóåìàÿ_öeíà, pos))/Point; pos--;}
string symbol[7];
symbol[0]="GBPJPY";symbol[1]="NZDJPY";symbol[2]="AUDJPY";symbol[3]="CHFJPY";
symbol[4]="EURJPY";symbol[5]="CADJPY";symbol[6]="USDJPY";
color colore[7];
colore[0] = Color1;colore[1] = Color2;colore[2] = Color3;colore[3] = Color4;colore[4] = Color5;colore[5] = Color6;colore[6] = Color7;
int labe[7];
labe[0]=0; labe[1]=13; labe[2]=26; labe[3]=39; labe[4]=52; labe[5]=65; labe[6]=78;
double ma_buffer[7];
ma_buffer[0]= ma1_buffer [0]; ma_buffer[1]= ma2_buffer [0]; ma_buffer[2]= ma3_buffer [0];
ma_buffer[3]= ma4_buffer [0]; ma_buffer[4]= ma5_buffer [0]; ma_buffer[5]= ma6_buffer [0]; ma_buffer[6]= ma7_buffer [0];
string text[7];
text[0]=DoubleToStr(ma_buffer[0],2) ; text[1]=DoubleToStr(ma_buffer[1],2) ; text[2]=DoubleToStr(ma_buffer[2],2) ;
text[3]=DoubleToStr(ma_buffer[3],2) ; text[4]=DoubleToStr(ma_buffer[4],2) ; text[5]=DoubleToStr(ma_buffer[5],2) ; text[6]=DoubleToStr(ma_buffer[6],2) ;
int òîëùèíà=1,ðàçøðèô=10;if(Short=="MultiCCI PRICE #1"){for (int i_4 = 0; i_4 < 7; i_4++) {òîëùèíà=1;ðàçøðèô=10;
if (symbol[i_4] == Symbol()) {òîëùèíà = 2;ðàçøðèô=12;}
ObjectDelete(symbol[i_4]);
ObjectCreate(symbol[i_4], OBJ_LABEL, WindowFind(Short), 0, 0);
ObjectSet(symbol[i_4], OBJPROP_CORNER, 1);
ObjectSet(symbol[i_4], OBJPROP_YDISTANCE, labe[i_4 ] + 5);
ObjectSet(symbol[i_4], OBJPROP_XDISTANCE, 5);
ObjectSetText(symbol[i_4],text[i_4]+" "+symbol[i_4],ðàçøðèô, "Times New Roman", colore[i_4]);
SetIndexStyle(i_4, DRAW_LINE, STYLE_SOLID, òîëùèíà, colore[i_4]);
SetIndexLabel(i_4, symbol[i_4]);}}
else{for (i_4 = 0; i_4 < 7; i_4++) {òîëùèíà=1;ðàçøðèô=10;
if (symbol[i_4] == Symbol()) {òîëùèíà = 2;ðàçøðèô=12;}
ObjectDelete(symbol[i_4]+"2");
ObjectCreate(symbol[i_4]+"2", OBJ_LABEL, WindowFind(Short), 0, 0);
ObjectSet(symbol[i_4]+"2", OBJPROP_CORNER, 1);
ObjectSet(symbol[i_4]+"2", OBJPROP_YDISTANCE, labe[i_4 ] + 5);
ObjectSet(symbol[i_4]+"2", OBJPROP_XDISTANCE, 5);
ObjectSetText(symbol[i_4]+"2",text[i_4]+" "+symbol[i_4],ðàçøðèô, "Times New Roman", colore[i_4]);
SetIndexStyle(i_4, DRAW_LINE, STYLE_SOLID, òîëùèíà, colore[i_4]);
SetIndexLabel(i_4, symbol[i_4]);}}
return(0);
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---