编码帮助 - 页 90

 

你好,Mladen。

我有一个指标,用信号线 SMA15绘制价格震荡器15-71SMA。

问题:当我使用这个指标时,它只出现了信号线的一小部分......,然后,经过一段时间后,出现了更长的信号线。

如果我关闭mt4并重新打开,信号线仍然是一小部分。

我还选择了零级......即在穿越15-71时......但正如你在图片中看到的那样,.... 零级是错误的。

在我的图表上,SMA15是橙色的,SMA71是白色的。

请看图片。

请见图片。

附加的文件:
immagine.gif  23 kb
ppo.ex4  3 kb
ppo.mq4  3 kb
 
carbonmimetic:
嗨,姆拉登。

我有一个指标,用信号线SMA15绘制价格震荡器15-71SMA。

问题:当我使用这个指标时,它只出现了信号线的一小部分......,然后,经过一段时间后,出现了更长的信号线。

如果我关闭mt4并重新打开,信号线仍然是一小部分。

我还选择了零级......即在穿越15-71时......但正如你在图片中看到的那样,.... 零级是错误的。

在我的图表上,SMA15是橙色的,SMA71是白色的。

请看图片。

预先感谢

碳模仿

给你

附加的文件:
ppo.gif  35 kb
ppo_1.mq4  3 kb
 

自从我发现这个论坛以来,我已经感谢你多少次了?

也许我的指标编码非常简单,......,但对我来说,我对元语言一无所知......是不可能的,.....so....A BIG BIG BIG THANK YOU.

因此,最后但并非最不重要,对我来说更重要的 是Demark's Sequential......,我有3个指标,但都是不完整的。

在我的解释上编码如何?

我希望你能做到这一点....

 
carbonmimetic:
自从我发现这个论坛以来,我有多少次感谢你?

也许我的指标编码非常简单,......,但对我来说,我对元语言一无所知......是不可能的.....so....A BIG BIG BIG THANK YOU。

因此,最后但并非最不重要,而且对我来说更重要的是Demark's Sequential......,我有3个指标,但都是不完整的。

在我的解释上编码呢?

我希望你能做到....

你有没有检查过metatrader 4的现有版本(例如这个:https://www.mql5.com/en/forum/181798),但还有很多(你可以使用页面顶部的搜索工具--这是一个谷歌搜索,功能相当强大--例如尝试搜索TD sequential)。

 

大家好。

可能是个愚蠢的问题。我有一个期权价格的指标:0-5;所以0代表收盘;1代表开盘?谁能帮帮我?

 
Jonas_Hellwig:
大家好,可能是个愚蠢的问题。我有一个期权价格的指标:0-5;那么0代表收盘;1代表开盘?谁能帮帮我?

乔纳斯

价格列举如下
:0-收盘价

1-开盘价

2-最高价

3-最低价

4-中位数(高+低)/2

5-典型(高+低+收)/3

6-加权(高+低+收+收)/4

 
mladen:
对不起,我不知道TimeFrameExpand()和TimeFrameRestore()是做什么的。

你好,mladen

来源如下!

你能不能进入MT4,非常感谢

_SECTION_BEGIN("pfoot");

TimeFrameSet(inDaily);

TR=Max(Max((High-Low),abs(Ref(Close,-1)-High)),abs(Ref(Close,-1)-Low))。

A=H-(TR*0.3)。

A1=H-(TR*0.6)。

A2=H-(TR*0.8);

A3=H-(TR*1.0)。

//

B=L+(TR*0.3)。

B1=L+(TR*0.6);

B2=L+(TR*0.8);

B3=L+(TR*1.0);

//

N=100;

H2=HHV(H,N);

L2=LLV(L,N)。

PPF=Ref(A,BarsLast(H2));//

PPF1=Ref(A1,BarsLast(H2));//

PPF2=Ref(A2,BarsLast(H2))。

PPF3=Ref(A3,BarsLast(H2));//

//

PPFF=Ref(B,BarsLast(L2));//

PPFF1=Ref(B1,BarsLast(L2));//

PPFF2=参考(B2,BarsLast(L2));//

PPFF3=Ref(B3,BarsLast(L2));//

TimeFrameRestore()。

// 绘制支撑位 的云图和线图。

Plot(TimeFrameExpand(PPF,inDaily ,expandLast), "R1", colorGreen, styleThick);

Plot(TimeFrameExpand(PPF1,inDaily ,expandLast), "R2", colorGreen,styleThick);

Plot(TimeFrameExpand(PPF2,inDaily ,expandLast), "R3", colorGreen, styleThick);

Plot(TimeFrameExpand(PPF3,inDaily ,expandLast), "R4", colorGreen, styleThick);

Plot(TimeFrameExpand(PPFF,inDaily ,expandLast), "S1", colorBlue, styleThick);

Plot(TimeFrameExpand(PPFF1,inDaily ,expandLast), "S2", colorBlue,styleThick);

Plot(TimeFrameExpand(PPFF2,inDaily ,expandLast), "S3", colorBlue, styleThick);

Plot(TimeFrameExpand(PPFF3,inDaily ,expandLast), "S4", colorBlue,styleThick);

_section_end()。

谢谢你

姜思达

2013-5-24

 
mladen:
你是否检查了已经存在的metatrader 4的版本(例如这个:https://www.mql5.com/en/forum/181798),但还有很多(你可以使用页面顶部的搜索工具 - 这是一个谷歌搜索,相当强大 - 尝试搜索TD序列为例)

所有Demark的序列都是不完整的.....,如果你想(或其他人对....),你可以在上面的链接中开始编码......,你可以看到我在一个月前要求它.....。

我可以写所有的解释,以便编码和在多时间框架中的强大使用......请......告诉我,如果你准备好了!

我希望是!!!!

向我的编码员致以最好的问候!

p.s. 也许你没有看到上面的链接是我写的?(https://www.mql5.com/en/forum/181798)

 

你好。

我有这个指标,我用它来绘制我的交易时间的方框,我可以在我的终端,所以我可以让它绘制一个蓝色背景的方框,或灰色等,我必须选择。原本它是一个突破指标,但我用它来绘制我的交易时间。

目前,外部颜色BoxHLColor = MidnightBlue;我选择的是黑色背景。

是否有可能让指标根据前一天的蜡烛颜色自动选择这个颜色呢?

(或回看2天、3天等)的蜡烛颜色。

因此,如果前一天的蜡烛是绿色的,那么就把盒子变成绿色,如果前一天的蜡烛是红色的,那么就把盒子的颜色变成红色等等。

我希望这有意义。这将是非常有帮助的,我真的很感谢任何对此的帮助。

洛克菲勒

附加的文件:
 

mladen...你能纠正这个错误吗?

//+------------------------------------------------------------------+

//| MTF_RSI.mq4 |

//| Copyright © 2006, Keris2112 |

//| |

//+------------------------------------------------------------------+

#property copyright "Copyright © 2006, Keris2112"

#property link "https://www.forex-tsd.com"

//----

#property indicator_separate_window

#property indicator_buffers 3

#property indicator_color1 Red

#property indicator_color2 DodgerBlue

#property indicator_color3 White

#property indicator_level1 30

#property indicator_level2 70

#property indicator_minimum 0

#property indicator_maximum 100

//----

extern int TimeFrame=5;

extern int RSIperiod=33;

extern int applied_price=0;

extern int TimeFrame1=15;

extern int RSIperiod1=21;

extern int applied_price1=0;

extern int TimeFrame2=15;

extern int RSIperiod2=14;

extern int applied_price2=0;

//----

double ExtMapBuffer1[];

double ExtMapBuffer2[];

double ExtMapBuffer3[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicator line

SetIndexBuffer(0,ExtMapBuffer1);

SetIndexStyle(0,DRAW_LINE);

SetIndexBuffer(1,ExtMapBuffer2);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(2,ExtMapBuffer3);

SetIndexStyle(2,DRAW_LINE);

//---- name for DataWindow and indicator subwindow label

switch(TimeFrame)

{

case 1 : string TimeFrameStr="Period_M1"; break;

case 5 : TimeFrameStr="Period_M5"; break;

case 15 : TimeFrameStr="Period_M15"; break;

case 30 : TimeFrameStr="Period_M30"; break;

case 60 : TimeFrameStr="Period_H1"; break;

case 240 : TimeFrameStr="Period_H4"; break;

case 1440 : TimeFrameStr="Period_D1"; break;

case 10080 : TimeFrameStr="Period_W1"; break;

case 43200 : TimeFrameStr="Period_MN1"; break;

default : TimeFrameStr="Current Timeframe";

}

IndicatorShortName("MTF_RSI("+RSIperiod+") ("+TimeFrameStr+")");

}

//----

return(0);

//+------------------------------------------------------------------+

//| MTF RSI |

//+------------------------------------------------------------------+

int start()

{

datetime TimeArray[];

int i,limit,y=0,counted_bars=IndicatorCounted();

// Plot defined time frame on to current time frame

ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);

limit=Bars-counted_bars;

for(i=0,y=0;i<limit;i++)

{

if (Time<TimeArray[y]) y++;

//----

ExtMapBuffer1=iRSI(NULL,TimeFrame,RSIperiod,applied_price,y);

}

datetime TimeArray1[];

int ii,limiti,yi=0,counted_bars1=IndicatorCounted();

// Plot defined time frame on to current time frame

ArrayCopySeries(TimeArray1,MODE_TIME,Symbol(),TimeFrame1);

limiti=Bars-counted_bars1;

for(ii=0,yi=0;ii<limiti;ii++)

{

if (Time<TimeArray1[yi]) yi++;

//----

ExtMapBuffer2=iRSI(NULL,TimeFrame1,RSIperiod1,applied_price1,yi);

}

datetime TimeArray2[];

int iii,limitii,yii=0,counted_bars2=IndicatorCounted();

// Plot defined time frame on to current time frame

ArrayCopySeries(TimeArray2,MODE_TIME,Symbol(),TimeFrame2);

limitii=Bars-counted_bars2;

for(iii=0,yii=0;iii<limitii;iii++)

{

if (Time<TimeArray2[yii]) yii++;

//----

ExtMapBuffer3=iRSI(NULL,TimeFrame2,RSIperiod2,applied_price2,yii);

}

//----

return(0);

}

//+------------------------------------------------------------------+