Author: 暴走的面条
Indicators Used
Moving average indicator
2 Views
0 Downloads
0 Favorites
MApassage
ÿþ//+------------------------------------------------------------------+

//|                                                     GW¿~S.mq4 |

//|                                                       ´fp„vb—ag |

//|                                                 364429340@qq.com |

//+------------------------------------------------------------------+

#property copyright "´fp„vb—ag"

#property link      "364429340@qq.com"

#property version   "1.00"

#property strict

#property indicator_chart_window

#property indicator_buffers 15

#property indicator_plots   15

//--- plot -NÃ_¿~

#property indicator_label1  "-NÃ_¿~"

#property indicator_type1   DRAW_LINE

#property indicator_color1  Yellow

#property indicator_style1  STYLE_SOLID

#property indicator_width1  1

//--- plot 
N¹Lu

#property indicator_label2  "
N¹Lu1"

#property indicator_type2   DRAW_LINE

#property indicator_color2  clrRed

#property indicator_style2  STYLE_SOLID

#property indicator_width2  2

//--- plot N¹Lu

#property indicator_label3  "N¹Lu1"

#property indicator_type3   DRAW_LINE

#property indicator_color3  clrDeepSkyBlue

#property indicator_style3  STYLE_SOLID

#property indicator_width3  2

//--- plot 
N¹Lu

#property indicator_label4  "
N¹Lu2"

#property indicator_type4   DRAW_SECTION

#property indicator_color4  clrRed

#property indicator_style4  STYLE_DOT

#property indicator_width4  1

//--- plot N¹Lu

#property indicator_label5  "N¹Lu2"

#property indicator_type5   DRAW_SECTION

#property indicator_color5  clrDeepSkyBlue

#property indicator_style5  STYLE_DOT

#property indicator_width5  1

//--- plot 
N¹Lu

#property indicator_label6  "
N¹Lu3"

#property indicator_type6   DRAW_SECTION

#property indicator_color6  clrRed

#property indicator_style6  STYLE_DOT

#property indicator_width6  1

//--- plot N¹Lu

#property indicator_label7  "N¹Lu3"

#property indicator_type7   DRAW_SECTION

#property indicator_color7  clrDeepSkyBlue

#property indicator_style7  STYLE_DOT

#property indicator_width7  1

//--- plot 
N¹Lu

#property indicator_label8  "
N¹Lu4"

#property indicator_type8   DRAW_SECTION

#property indicator_color8  clrRed

#property indicator_style8  STYLE_DOT

#property indicator_width8  1

//--- plot N¹Lu

#property indicator_label9  "N¹Lu4"

#property indicator_type9   DRAW_SECTION

#property indicator_color9  clrDeepSkyBlue

#property indicator_style9  STYLE_DOT

#property indicator_width9  1

//--- plot 
N¹Lu

#property indicator_label10  "
N¹Lu5"

#property indicator_type10   DRAW_SECTION

#property indicator_color10  clrRed

#property indicator_style10  STYLE_DOT

#property indicator_width10  1

//--- plot N¹Lu

#property indicator_label11 "N¹Lu5"

#property indicator_type11  DRAW_SECTION

#property indicator_color11 clrDeepSkyBlue

#property indicator_style11 STYLE_DOT

#property indicator_width11 1

//--- plot 
N¹Lu

#property indicator_label12 "
N¹Lu6"

#property indicator_type12  DRAW_LINE

#property indicator_color12 clrRed

#property indicator_style12 STYLE_SOLID

#property indicator_width12 3

//--- plot N¹Lu

#property indicator_label13 "N¹Lu6"

#property indicator_type13  DRAW_LINE

#property indicator_color13 clrDeepSkyBlue

#property indicator_style13 STYLE_SOLID

#property indicator_width13 3

//--- input parameters

input int      MA=144;

input int      SMA0EMA1=1;

input int      ¹Lu=1000;

input int      ô•ݍ=100;



//--- indicator buffers

double         -NÃ_¿~Buffer[];

double         
N¹Lu1Buffer[];

double         N¹Lu1Buffer[];

double         
N¹Lu2Buffer[];

double         N¹Lu2Buffer[];

double         
N¹Lu3Buffer[];

double         N¹Lu3Buffer[];

double         
N¹Lu4Buffer[];

double         N¹Lu4Buffer[];

double         
N¹Lu5Buffer[];

double         N¹Lu5Buffer[];

double         
N¹Lu6Buffer[];

double         N¹Lu6Buffer[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function                         |

//+------------------------------------------------------------------+

int OnInit()

  {

//--- indicator buffers mapping

   SetIndexBuffer(0,-NÃ_¿~Buffer);

   SetIndexBuffer(1,
N¹Lu1Buffer);

   SetIndexBuffer(2,N¹Lu1Buffer);

   SetIndexBuffer(3,
N¹Lu2Buffer);

   SetIndexBuffer(4,N¹Lu2Buffer);

   SetIndexBuffer(5,
N¹Lu3Buffer);

   SetIndexBuffer(6,N¹Lu3Buffer);

   SetIndexBuffer(7,
N¹Lu4Buffer);

   SetIndexBuffer(8,N¹Lu4Buffer);

   SetIndexBuffer(9,
N¹Lu5Buffer);

   SetIndexBuffer(10,N¹Lu5Buffer);

   SetIndexBuffer(11,
N¹Lu6Buffer);

   SetIndexBuffer(12,N¹Lu6Buffer);

//---

   return(INIT_SUCCEEDED);

  }

//+------------------------------------------------------------------+

//| Custom indicator iteration function                              |

//+------------------------------------------------------------------+

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[])

  {

//¡‹—{þVh@b	g„vK¿~ãNx

    int counted_bars=IndicatorCounted();    

    if(counted_bars<0) return(-1); 

    if(counted_bars>0) counted_bars--;

    int limit=Bars-counted_bars;  

    for(int i=0;i<limit;i++)

      {

        -NÃ_¿~Buffer[i]=iMA(Symbol(),0,MA,0,SMA0EMA1,PRICE_CLOSE,i);

        double -NÃ_¿~price=-NÃ_¿~Buffer[i];

        
N¹Lu1Buffer[i]=-NÃ_¿~price+¹Lu*Point;

        N¹Lu1Buffer[i]=-NÃ_¿~price-¹Lu*Point;

        
N¹Lu2Buffer[i]=-NÃ_¿~price+¹Lu*Point+ô•ݍ*Point;

        N¹Lu2Buffer[i]=-NÃ_¿~price-¹Lu*Point-ô•ݍ*Point;

        
N¹Lu3Buffer[i]=-NÃ_¿~price+¹Lu*Point+ô•ݍ*2*Point;

        N¹Lu3Buffer[i]=-NÃ_¿~price-¹Lu*Point-ô•ݍ*2*Point;

        
N¹Lu4Buffer[i]=-NÃ_¿~price+¹Lu*Point+ô•ݍ*3*Point;

        N¹Lu4Buffer[i]=-NÃ_¿~price-¹Lu*Point-ô•ݍ*3*Point;

        
N¹Lu5Buffer[i]=-NÃ_¿~price+¹Lu*Point+ô•ݍ*4*Point;

        N¹Lu5Buffer[i]=-NÃ_¿~price-¹Lu*Point-ô•ݍ*4*Point;

        
N¹Lu6Buffer[i]=-NÃ_¿~price+¹Lu*Point+ô•ݍ*5*Point;

        N¹Lu6Buffer[i]=-NÃ_¿~price-¹Lu*Point-ô•ݍ*5*Point;

      } 

   return(rates_total);

  }

//+------------------------------------------------------------------+

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---