客服热线:18391752892

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

   日期:2019-01-12     浏览:88    
马上注册,结交更多好友,下载更多资源

您需要 登录 才可以下载或查看,没有帐号?注册 C:documents and SettingsHPMy documentsMy Pictures1.jpg div > //|                                    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[i];
        if(last_low price_low)   last_low=price_low;
        price_high=High[i];
        if(last_highHigh[i+1] price_low Low[i+1]) break;
        if(price_high
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!


特别提示:本信息由相关企业自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。


0相关评论
相关行情
推荐行情
点击排行