发表于:2009-05-17 07:17只看该作者
3楼
其实最简单的方法是比较相临时间的均线值之差,大于0角度为正,小于0角度为负。
轻仓小量,顺势而为;细水长流,积少成多
4楼
请各位大侠帮忙编一下,我不会编MT4指标啊
利润是等出来的,亏损是冲动出来的
发表于:2009-07-10 06:22只看该作者
5楼
我顶帖主要是为升级 所以我见帖就顶
韬客社区www.talkfx.co
发表于:2009-07-14 03:58只看该作者
6楼
//+------------------------------------------------------------------+
//| VTTH-Slope.mq4 |
//| Copyright ?2006, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2006, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 DarkTurquoise
#property indicator_level1 0
/*
#property indicator_level2 15
#property indicator_level3 30
#property indicator_level4 45
#property indicator_level5 60
#property indicator_level6 -15
#property indicator_level7 -30
#property indicator_level8 -45
*/
//---- input parameters
extern int P_MA = 8;
extern int KPeriod = 1;
extern int DPeriod = 3;
//---- buffers
double ExtMapBuffer0;
double ExtMapBuffer1;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexDrawBegin(0,P_MA+KPeriod);
SetIndexBuffer(0,ExtMapBuffer0);
SetIndexStyle(1,DRAW_LINE);
SetIndexDrawBegin(1,P_MA+KPeriod+DPeriod);
SetIndexBuffer(1,ExtMapBuffer1);
IndicatorDigits(Digits+1);
IndicatorShortName("MaSpeed("+P_MA+","+KPeriod+","+DPeriod+")");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i
韬客社区www.talkfx.co
发表于:2009-07-14 03:59只看该作者
7楼
参数分别是: 均线周期、计算步长、慢线周期
8楼
这两行出错不能编译???不知道是什么原因
ExtMapBuffer0=(iMA(NULL,0,P_MA,0,MODE_SMA,PRICE_CLOSE,i)
-iMA(NULL,0,P_MA,0,MODE_SMA,PRICE_CLOSE,i+KPeriod))/KPeriod/Point;
for(i=0; i
利润是等出来的,亏损是冲动出来的
发表于:2009-08-27 08:51只看该作者
9楼
抱歉来好少,晚上看看帮你收拾下
韬客社区www.talkfx.co