สวัสดี Guys,
ฉันเล่นกับฟังก์ชัน iMAOnArray แต่ไม่สามารถรับตัวบ่งชี้ต่อไปนี้เพื่อให้มีการแสดงผล หน้าต่างตัวบ่งชี้ที่ฉันลากลงในช่องว่างอยู่
ความช่วยเหลือใด ๆ ที่ชื่นชม
ความนับถือ
สตีฟ
// ----------------------------------------------- -------------------
//| iMAOnArray.mq4 |
//| นักเขียนโค้ดคุรุ |
//|
http://www.metatrader.info|
// ----------------------------------------------- -------------------
#property Guru ของ Coders ลิขสิทธิ์
#property link http://www.metatrader.info
#property indior_separate_window
#property indior_color1 LawnGreen
# indior blue 2 สีน้ำเงินเข้ม
double ExtMapBuffer1 [];
double RSI_Val [];
double RSI_Val_SMA [];
int init ()
{
IndiorDigits (MarketInfo (สัญลักษณ์ () MODE_DIGITS));
SetIndexStyle (0, DRAW_LINE);
SetIndexBuffer (0, ExtMapBuffer1);
ผลตอบแทน (0);
}
int deinit ()
{
ผลตอบแทน (0);
}
เริ่มต้น int ()
{
int บาร์ขีด จำกัด ;
int counted_bars = IndiorCounted ();
ถ้า (counted_barslt; 0) return (-1);
if (counted_barsgt; 0) counted_bars--;
ขีด จำกัด = บาร์ IndiorCounted ();
สำหรับ (บาร์ = 0; barlt; ขีด จำกัด แถบ )
RSI_Val [bar] = iCustom (NULL, 0, RSI, 0,0, บาร์);
สำหรับ (บาร์ = 0; barlt; ขีด จำกัด แถบ )
RSI_Val_SMA [บาร์] = iMAOnArray (RSI_Val, บาร์, 5,0, MODE_SMA, บาร์);
for (bar = 0; barlt; limit; bar ) {
ถ้า (RSI_Val [บาร์] gt; RSI_Val_SMA [บาร์])
ExtMapBuffer1 [bar] = 1;
อื่น
ExtMapBuffer1 [bar] = 0;
}
ผลตอบแทน (0);
}