有没有用heiken ashi公式 Smoothed作为交易系统的汇友

后使用快捷导航没有帐号?
签到成功!您今天第{todayrank}个签到,签到排名竞争激烈,记得每天都来签到哦!已连续签到:{constant}天,累计签到:{days}天
HeikenAshi.mq4
马上注册,结交更多好友,下载更多资源
才可以下载或查看,没有帐号?
EURUSDM30.png (27.23 KB, 下载次数: 0)
12:54 上传
//+------------------------------------------------------------------+
//|& && && && && && && && && && && && && && && && &&&Heiken Ashi.mq4 |
//|& && && && && && && && &Copyright 2004, MetaQuotes Software Corp. |
//|& && && && && && && && && && && && && & http://www.metaquotes.net |
//+------------------------------------------------------------------+
//| For Heiken Ashi we recommend next chart settings ( press F8 or& &|
//| select on menu 'Charts'-&'Properties...'):& && && && && && && &&&|
//|&&- On 'Color' Tab select 'Black' for 'Line Graph'& && && && && & |
//|&&- On 'Common' Tab disable 'Chart on Foreground' checkbox and& & |
//|& & select 'Line Chart' radiobutton& && && && && && && && && && & |
//+------------------------------------------------------------------+
#property copyright &Copyright 2004, MetaQuotes Software Corp.&
#property link& && &&http://www.metaquotes.net&
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_color3 Red
#property indicator_color4 Blue
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//----
int ExtCountedBars=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function& && && && && && && && & |
//|------------------------------------------------------------------|
int init()
&&{
//---- indicators
& &SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, Red);
& &SetIndexBuffer(0, ExtMapBuffer1);
& &SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, Blue);
& &SetIndexBuffer(1, ExtMapBuffer2);
& &SetIndexStyle(2,DRAW_HISTOGRAM, 0, 3, Red);
& &SetIndexBuffer(2, ExtMapBuffer3);
& &SetIndexStyle(3,DRAW_HISTOGRAM, 0, 3, Blue);
& &SetIndexBuffer(3, ExtMapBuffer4);
//----
& &SetIndexDrawBegin(0,10);
& &SetIndexDrawBegin(1,10);
& &SetIndexDrawBegin(2,10);
& &SetIndexDrawBegin(3,10);
//---- indicator buffers mapping
& &SetIndexBuffer(0,ExtMapBuffer1);
& &SetIndexBuffer(1,ExtMapBuffer2);
& &SetIndexBuffer(2,ExtMapBuffer3);
& &SetIndexBuffer(3,ExtMapBuffer4);
//---- initialization done
& &return(0);
&&}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function& && && && && && && &&&|
//+------------------------------------------------------------------+
int deinit()
&&{
//---- TODO: add your code here
& &
//----
& &return(0);
&&}
//+------------------------------------------------------------------+
//| Custom indicator iteration function& && && && && && && && && && &|
//+------------------------------------------------------------------+
int start()
&&{
& &double haOpen, haHigh, haLow, haC
& &if(Bars&=10) return(0);
& &ExtCountedBars=IndicatorCounted();
//---- check for possible errors
& &if (ExtCountedBars&0) return(-1);
//---- last counted bar will be recounted
& &if (ExtCountedBars&0) ExtCountedBars--;
& &int pos=Bars-ExtCountedBars-1;
& &while(pos&=0)
& &&&{
& && &haOpen=(ExtMapBuffer3[pos+1]+ExtMapBuffer4[pos+1])/2;
& && &haClose=(Open[pos]+High[pos]+Low[pos]+Close[pos])/4;
& && &haHigh=MathMax(High[pos], MathMax(haOpen, haClose));
& && &haLow=MathMin(Low[pos], MathMin(haOpen, haClose));
& && &if (haOpen&haClose)
& && &&&{
& && && &ExtMapBuffer1[pos]=haL
& && && &ExtMapBuffer2[pos]=haH
& && &&&}
& && &else
& && &&&{
& && && &ExtMapBuffer1[pos]=haH
& && && &ExtMapBuffer2[pos]=haL
& && &&&}
& && &ExtMapBuffer3[pos]=haO
& && &ExtMapBuffer4[pos]=haC
& & & && & pos--;
& &&&}
//----
& &return(0);
&&}
//+------------------------------------------------------------------+复制代码
(4.68 KB, 下载次数: 6)
13:07 上传
点击文件名下载附件
下载积分: 金币 -2 金币
_,汇友网更关注外汇交易者
外汇EA之家,是汇友网旗下的外汇交易系统分享社区。在EA之家可以免费下载任何外汇指标、外汇EA。
电子邮箱:Heiken&Ashi&Smoothed&策略的EA
...比如 HA 1分钟出现做多信号 就多1手,赚4-5点以上自动锁住1点的止损,然后等待下次机会继续进...
一般1分钟线提示做多会有很大的概率至少涨8-10点...如果处于可以多半径内就只做多单,肯定有一些单子可以幸存下来....只是不停的挂单,锁利润...
直到把全部资金都用完..然后停止策略....
extern string s1="TIME TO WAIT IN SECONDS";
extern int TimeSpan=10;
extern string s2="-----------------------";
extern int TakeProfit=50;
extern int StopLoss=50;
extern int Magic=12367;
extern int MaMetod=2;
extern int MaPeriod=6;
extern int MaMetod2 =3;
extern int MaPeriod2=2;
double haO
double haC
double haOpen2;
double haClose2;
int init()
return(0);
int deinit()
return(0);
datetime CandleTime=0;
int nTrend=0;
int start()
datetime TimeN
if(OrdersTotal()!=0)
OrderSelect(nTicket,SELECT_BY_TICKET);
if(OrderMagicNumber()==Magic)
if((OrderType()==OP_SELL)&&(nTrend==1))
TimeNow=TimeCurrent();
if((TimeNow-CandleTime)&TimeSpan) OrderClose(OrderTicket(),
OrderLots(), Ask, 3, Red);
if((OrderType()==OP_BUY)&&(nTrend==2))
TimeNow=TimeCurrent();
if((TimeNow-CandleTime)&TimeSpan) OrderClose(OrderTicket(),
OrderLots(), Bid, 3, Red);
haOpen=iCustom(NULL,0,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,2,0);
haClose=iCustom(NULL,0,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,3,0);
haOpen2=iCustom(NULL,0,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,1,0);
haClose2=iCustom(NULL,0,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,0,0);
if((haOpen&=haClose)&&(haOpen2
if(nTrend==2)
TimeNow=TimeCurrent();
if((TimeNow-CandleTime)&TimeSpan)
if(OrdersTotal()==0)
nTicket=OrderSend(Symbol(),OP_SELL,1,Bid,3,Bid+StopLoss*Point,Bid-TakeProfit*Point,"HA
Order",Magic,0,Green);
CandleTime=TimeCurrent();
if(nTrend==1)
TimeNow=TimeCurrent();
if((TimeNow-CandleTime)&TimeSpan)
if(OrdersTotal()==0)
nTicket=OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point,"HA
Order",Magic,0,Green);
CandleTime=TimeCurrent();
return(0);
已投稿到:& 查看内容
Heiken_Ashi_Smoothed3
21:07| 发布者: | 查看: 1219| 评论:
|原作者: 520FX
简介:点击下载- Heiken_Ashi_Smoothed3.mq4
刚表态过的朋友 ()
浏览过的版块
浏览过的版块

我要回帖

更多关于 heiken ashi smoothed 的文章

 

随机推荐