如何计算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 不是吧 楼主good 我有一个EA 好坏你自己定免费的需要的话 可以发给你玩玩 貌似我真的很笨????哎 老大,我好崇拜你哟 真是有你的! 做一个,做好了,请看 路过。。看下先。 看看什么EA,,,