İş tamamlandı
Tamamlanma süresi: 16 saat
Müşteri tarafından geri bildirim
Programmer motion helpful and professional. Recommended!!
İş Gereklilikleri
Hi, I need to correct this code. When the MA3 crosses the RSI2 from the bottom up, it must appear to the arrow. I wrote this code but it does not work. Thanks, Max.
#property indicator_chart_window #property indicator_buffers 1 #property indicator_type1 DRAW_ARROW #property indicator_width1 1 #property indicator_color1 clrGreen #property indicator_label1 "Buy" input int Period_RSI=2; input int Period_MA=3; //--- indicator buffers double Buffer1[]; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int OnInit() { IndicatorBuffers(2); SetIndexBuffer(0, Buffer1); SetIndexEmptyValue(0, 0); SetIndexArrow(0, 241); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[]) { double RSI[]; double MA[]; RSI[0]= iRSI(NULL,PERIOD_CURRENT,Period_RSI,PRICE_CLOSE,0); MA[0]= iMA(NULL,PERIOD_CURRENT,Period_MA,0,MODE_SMA,PRICE_CLOSE,0); int limit = rates_total - prev_calculated; //--- counting from 0 to rates_total ArraySetAsSeries(Buffer1, true); //--- initial zero if(prev_calculated < 1) { ArrayInitialize(Buffer1, 0); } else limit++; //--- main loop for(int i = limit-1; i >= 0; i--) { if (i >= MathMin(300-1, rates_total-1-50)) continue; //Indicator Buffer 1 if (iMAOnArray(RSI,0,Period_MA,0,0,1)< iRSIOnArray(MA,0,Period_RSI,0)//Cross MA-RSI && iMAOnArray(RSI,0,Period_MA,0,0,0)>iRSIOnArray(MA,0,Period_RSI,0) ) { Buffer1[i] = Low[i] - 10 *Point(); } else { Buffer1[i] = 0; } } return(rates_total); }
Yanıtlandı
1
Derecelendirme
Projeler
1410
67%
Arabuluculuk
123
32%
/
41%
Süresi dolmuş
218
15%
Serbest
Yayınlandı: 1 kod
2
Derecelendirme
Projeler
789
71%
Arabuluculuk
9
33%
/
33%
Süresi dolmuş
22
3%
Serbest
Yayınlandı: 8 kod
3
Derecelendirme
Projeler
412
61%
Arabuluculuk
13
38%
/
23%
Süresi dolmuş
163
40%
Serbest
Yayınlandı: 45 makale, 1 kod
4
Derecelendirme
Projeler
1462
63%
Arabuluculuk
21
57%
/
10%
Süresi dolmuş
43
3%
Serbest
5
Derecelendirme
Projeler
2912
63%
Arabuluculuk
122
44%
/
25%
Süresi dolmuş
429
15%
Çalışıyor
6
Derecelendirme
Projeler
1810
61%
Arabuluculuk
14
64%
/
7%
Süresi dolmuş
84
5%
Serbest
Proje bilgisi
Bütçe
10 - 15 USD
Son teslim tarihi
from 1 to 3 gün