eczsbufd 发表于 2011-9-15 22:01:27

如何计算SAR指标的k线数量

C:Documents and SettingsHPMy DocumentsMy Pictures1.jpg<div class=\"blockcode\"><div id=\"code_GQS\"><ol>//+------------------------------------------------------------------+
//|                                                    Parabolic.mq4 |
//|                      Copyright ?2004, MetaQuotes Software Corp. |
//|                                       http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright \"Copyright ?2004, MetaQuotes Software Corp.\"
#property link      \"http://www.metaquotes.net/\"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Lime
//---- input parameters
extern double    Step=0.02;
extern double    Maximum=0.2;
//---- buffers
double SarBuffer[];
//----
int    save_lastreverse;
bool   save_dirlong;
double save_start;
double save_last_high;
double save_last_low;
double save_ep;
double save_sar;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
   {
//---- indicators
    SetIndexStyle(0,DRAW_ARROW);
    SetIndexArrow(0,159);
    SetIndexBuffer(0,SarBuffer);
//----
    return(0);
   }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void SaveLastReverse(int last,int dir,double start,double low,double high,double ep,double sar)
   {
    save_lastreverse=last;
    save_dirlong=dir;
    save_start=start;
    save_last_low=low;
    save_last_high=high;
    save_ep=ep;
    save_sar=sar;
   }
//+------------------------------------------------------------------+
//| Parabolic Sell And Reverse system                              |
//+------------------------------------------------------------------+
int start()
   {
    static bool first=true;
    bool   dirlong;
    double start,last_high,last_low;
    double ep,sar,price_low,price_high,price;
    int    i,counted_bars=IndicatorCounted();
//----
    if(Bars0)
         {
          save_lastreverse=i;
          price_low=Low;
          if(last_low>price_low)   last_low=price_low;
          price_high=High;
          if(last_highHigh && price_low>Low) break;
          if(price_high

搁浅 发表于 2012-11-22 02:15:12

不是吧

avril 发表于 2012-11-22 02:15:12

楼主good

lramr 发表于 2012-11-22 02:15:12

我有一个EA 好坏你自己定免费的需要的话 可以发给你玩玩

坑爹的外汇 发表于 2012-11-22 02:15:12

貌似我真的很笨????哎

落羽 发表于 2012-11-22 02:15:12

老大,我好崇拜你哟

知足常乐 发表于 2012-11-22 02:15:12

真是有你的!

和其正 发表于 2012-11-22 02:15:12

做一个,做好了,请看

ゞ__染_指 发表于 2014-12-10 07:46:18

路过。。看下先。

心雨 发表于 2014-12-10 20:50:15

看看什么EA,,,
页: [1] 2 3
查看完整版本: 如何计算SAR指标的k线数量