코딩 도움말 - 페이지 91

 
k3rn3l:
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);

}

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

첨부 된 것을 사용해보십시오

파일:
 

안녕 믈라덴

첨부된 표시기에 "velo6"을 추가할 수 있습니까?

색상 및 "true-false"에 대한 입력이 필요합니다. 예를 들어 이미지를 참조하십시오.

항상 감사합니다......

파일:
euro.gif  32 kb
 

1) 추세 동안 볼린저 밴드 가 넓어진 다음 추세가 멈추고 트레딩 범위가 있습니다. 거래 범위 동안 볼린저 밴드는 계약을 체결하고 이러한 상황에서 주식 과매수-과매수를 사용하는 것이 매우 좋습니다.

이것은 나의 metastoch 공식입니다 ...

너비:=

((Mov(C,71,S)+(2*(Std(C,71)))))-

(Mov(C,71,S)-(2*(Std(C,71)))));

미디어:=이동(WIDTH,15,S);

ST:=스토크(5,3);

시간:=BarsSince(WIDTH=0 AND

BarsSince(WIDTH<MEDIA)<=5;

CONDBUY:=ST<=30 또는 (Ref(ST<=30,-1) AND H<=Ref(H,-1));

시간과 CONBUY

설명:

1) 볼린저 밴드 71과 편차 2를 사용합니다.

2) 볼린저 밴드폭에 15 단순 이동 평균을 적용합니다.

3) 볼린저 밴드폭이 SMA 이하일 때 그리고 그 이후 5bar에 대해서도 시장이 거래 범위를 시작했음을 의미합니다....

4) 거래 범위가 있을 때 스토캐스틱이 30 미만인 경우

파일:
 
carbonmimetic:
안녕 믈라덴

첨부된 표시기에 "velo6"을 추가할 수 있습니까?

색상 및 "true-false"에 대한 입력이 필요합니다. 예를 들어 이미지를 참조하십시오.

항상 감사합니다......

탄소 모방

여기 당신이 간다

파일:
 

...전에도 말했듯이...항상 감사합니다!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

안녕 믈라덴

귀찮게 하려면 코드를 MT4 표시기에 넣어 주세요. 괜찮습니까?

테스트하기가 두렵습니다.

감사해요

크랭가스트

2013/5/25

 
Kreangast:
안녕 믈라덴

귀찮게 하려면 코드를 MT4 표시기에 넣어 주세요. 괜찮습니까?

테스트하기가 두렵습니다.

감사해요

크랭가스트

2013/5/25

죄송합니다

나는 Amibroker를 사용하지 않기 때문에 그 코드를 메타트레이더 4로 변환할 수 없고 100% 정확하다고 확신할 수 없습니다.

 
mladen:
죄송합니다. 저는 Amibroker를 사용하지 않기 때문에 해당 코드를 메타트레이더 4로 변환할 수 없으며 100% 정확하다고 확신할 수 없습니다.

안녕 믈라덴

죄송합니다 ! AMI 문제가 해결되었으므로.

MT4 교체에 도움을 주셔서 감사합니다.

"-BarsSince(X)=BarsLate(X)"

_SECTION_BEGIN("피트");

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=H==HHV(H,N);//

L2=L==LLV(L,N);//

PPF=Ref(A,-BarsSince(H2));//-BarsSince=BarsLate

PPF1=Ref(A1,-BarsSine(H2));//

PPF2=Ref(A2,-BarsSine(H2));//

PPF3=Ref(A3,-BarsSine(H2));//

// //

PPFF=Ref(B,-BarsSince(L2));//

PPFF1=Ref(B1,-BarSince(L2));//

PPFF2=Ref(B2,-BarsSince(L2));//

PPFF3=Ref(B3,-BarsSince(L2));//

TimeFrameRestore();

// 지원 수준 구름과 선을 플로팅합니다. //

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

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

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

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

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

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

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

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

_SECTION_END();

고맙습니다

크랭가스트

 

나는 여기에 내 질문을 공식화합니다.

차트에서 지표를 나타내는 막대의 수 를 줄이는 방법은 무엇입니까?

그래프에 표시되는 막대의 수를 줄이지 않고도 Metatrader.

많은 수의 지표에 적용할 수 있는 몇 줄의 코드가 있습니까?

관심을 가져주셔서 감사합니다.

 
Antonsan:
나는 여기에 내 질문을 공식화합니다.

차트에서 지표를 나타내는 막대의 수를 줄이는 방법은 무엇입니까?

그래프에 표시되는 막대의 수를 줄이지 않고도 Metatrader.

많은 수의 지표에 적용할 수 있는 몇 줄의 코드가 있습니까?

관심을 가져주셔서 감사합니다.

안톤산

이 게시물을 읽으십시오: https://www.mql5.com/en/forum/180284/page31 . 본질을 반복합니다 - 코드의 막대 제한을 변경해야 합니다. 다른 방법은 없습니다.