코딩 도움말 - 페이지 173

 

안녕하세요 코더 여러분,

마지막 막대가 sma10 위 또는 아래에 있을 때 경고를 표시하는 매우 간단한 표시기를 만들었습니다. 더 이상 아무것도. 하지만 3개의 다른 시간 프레임에서 확인하고 싶습니다. 나는 mtf-indicators로 일한 적이 없으므로 약간의 문제가 있습니다. 이 버전은 m1, m5 및 m15 차트를 확인합니다. 그것은 잘 작동하지만 조건이 충족되는 시간 프레임에서 한 번이 아니라 모든 틱 에 경고가 표시되는 문제가 있습니다.

누군가 나를 도와준다면 기쁠 것입니다. 나는 그것이 구문 문제 일 수 있다고 생각합니다.

감사합니다!

파일:
test.mq4  3 kb
 

안녕,

오류를 찾을 수 없기 때문에 다시 질문해야하지만 잘못된 값만 얻고 있습니다 :-(

혹시 내 실패를 본 사람이 있을까?!

이것은 표시기의 코드입니다.

#property indicator_chart_window

#property indicator_buffers 5

double WidestChannel_high[];

double InsideChannel_high[];

double StandardDeviation[];

double InsideChannel_low[];

double WidestChannel_low[];

extern int STD.Rgres.period=0; /*default 0 means the channel will use the open

time from "x" bars back on which ever time period

the indicator is attached to. one can change to 1,5,

15,30,60...etc to "lock" the start time to a specific

period, and then view the "locked" channels on a different time period...*/

extern int STD.Rgres.length=56; // bars back regression begins

extern double STD.Rgres.width=1.618;// widest channel

extern double STD.width=0.618; // inside channel

int init()

{

SetIndexBuffer(0,WidestChannel_high);

SetIndexLabel(0,"WidestChannel_high");

SetIndexBuffer(1,InsideChannel_high);

SetIndexLabel(1,"InsideChannel_high");

SetIndexBuffer(2,StandardDeviation);

SetIndexLabel(2,"StandardDeviation");

SetIndexBuffer(3,InsideChannel_low);

SetIndexLabel(3,"InsideChannel_low");

SetIndexBuffer(4,WidestChannel_low);

SetIndexLabel(4,"WidestChannel_low");

return(0);

}

int deinit() {

ObjectDelete("regression channel");ObjectDelete("std channel");return(0);

}

int start() {

int counted_bars=IndicatorCounted(),limit, iTF;

//---- last counted bar will be recounted

if(counted_bars>0) counted_bars--;

limit=Bars-counted_bars;

//to refresh properly delete old objects...

ObjectDelete("regression channel");ObjectDelete("std channel");

//widest channel

ObjectCreate("regression channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),

Close[STD.Rgres.length],Time[0],Close[0]);

ObjectSet("regression channel",OBJPROP_DEVIATION,STD.Rgres.width);

ObjectSet("regression channel",OBJPROP_COLOR,Orange);

ObjectSet("regression channel",OBJPROP_RAY,true);

//inside channel

ObjectCreate("std channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),

Close[STD.Rgres.length],Time[0],Close[0]);

ObjectSet("std channel",OBJPROP_DEVIATION,STD.width);

ObjectSet("std channel",OBJPROP_COLOR,Olive);

ObjectSet("std channel",OBJPROP_RAY,true);

for(int i=0; i<limit; i++)

{

double dev = iStdDev(NULL,STD.Rgres.period,STD.Rgres.length,0,MODE_SMA,PRICE_CLOSE,i);

double innerWidth = STD.width*dev;

double outerWidth = STD.Rgres.width*dev;

double price = ObjectGetValueByShift("std channel", i);

WidestChannel_high= price + outerWidth/2;

InsideChannel_high= price + innerWidth/2;

StandardDeviation= price;

InsideChannel_low= price - innerWidth/2;

WidestChannel_low= price - outerWidth/2;

}

return(0);}
 
sunshineh:
안녕,

오류를 찾을 수 없기 때문에 다시 질문해야하지만 잘못된 값만 얻고 있습니다 :-(

혹시 내 실패를 본 사람이 있을까?!

이것은 표시기의 코드입니다.

#property indicator_chart_window

#property indicator_buffers 5

double WidestChannel_high[];

double InsideChannel_high[];

double StandardDeviation[];

double InsideChannel_low[];

double WidestChannel_low[];

extern int STD.Rgres.period=0; /*default 0 means the channel will use the open

time from "x" bars back on which ever time period

the indicator is attached to. one can change to 1,5,

15,30,60...etc to "lock" the start time to a specific

period, and then view the "locked" channels on a different time period...*/

extern int STD.Rgres.length=56; // bars back regression begins

extern double STD.Rgres.width=1.618;// widest channel

extern double STD.width=0.618; // inside channel

int init()

{

SetIndexBuffer(0,WidestChannel_high);

SetIndexLabel(0,"WidestChannel_high");

SetIndexBuffer(1,InsideChannel_high);

SetIndexLabel(1,"InsideChannel_high");

SetIndexBuffer(2,StandardDeviation);

SetIndexLabel(2,"StandardDeviation");

SetIndexBuffer(3,InsideChannel_low);

SetIndexLabel(3,"InsideChannel_low");

SetIndexBuffer(4,WidestChannel_low);

SetIndexLabel(4,"WidestChannel_low");

return(0);

}

int deinit() {

ObjectDelete("regression channel");ObjectDelete("std channel");return(0);

}

int start() {

int counted_bars=IndicatorCounted(),limit, iTF;

//---- last counted bar will be recounted

if(counted_bars>0) counted_bars--;

limit=Bars-counted_bars;

//to refresh properly delete old objects...

ObjectDelete("regression channel");ObjectDelete("std channel");

//widest channel

ObjectCreate("regression channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),

Close[STD.Rgres.length],Time[0],Close[0]);

ObjectSet("regression channel",OBJPROP_DEVIATION,STD.Rgres.width);

ObjectSet("regression channel",OBJPROP_COLOR,Orange);

ObjectSet("regression channel",OBJPROP_RAY,true);

//inside channel

ObjectCreate("std channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),

Close[STD.Rgres.length],Time[0],Close[0]);

ObjectSet("std channel",OBJPROP_DEVIATION,STD.width);

ObjectSet("std channel",OBJPROP_COLOR,Olive);

ObjectSet("std channel",OBJPROP_RAY,true);

for(int i=0; i<limit; i++)

{

double dev = iStdDev(NULL,STD.Rgres.period,STD.Rgres.length,0,MODE_SMA,PRICE_CLOSE,i);

double innerWidth = STD.width*dev;

double outerWidth = STD.Rgres.width*dev;

double price = ObjectGetValueByShift("std channel", i);

WidestChannel_high= price + outerWidth/2;

InsideChannel_high= price + innerWidth/2;

StandardDeviation= price;

InsideChannel_low= price - innerWidth/2;

WidestChannel_low= price - outerWidth/2;

}

return(0);}

선샤인,

고가와 저가를 얻기 위해 편차를 2로 나눌 필요가 없습니다. "/2" 부분을 제거하고 중간 가격이 괜찮다면 괜찮습니다. 채널의 너비는 항상 일정합니다. 다른 값이 아닌 with에 현재 표준 수정을 사용해야 합니다. 그리고 마지막으로 내가 보는 한 ObjectGetValueByShift("std channel", i); 추세선에서 작동하므로 표준 편차 채널에서는 작동하지 않습니다. 반환되는 값은 무엇인지 모릅니다(첨부된 표시기를 참조하면 내가 그 가격이 얼마인지 모른다고 말하는 이유를 알 수 있습니다)

파일:
_test_4.mq4  3 kb
 

안녕 mladen,

내부 사전 설정 기호를 사용하여 샘플 표시기를 첨부합니다. 내부에서 이해하기가 상당히 어렵습니다. 이 표시기에서 힌트를 얻어 내 표시기 또는/& 귀하의 표시기에 적응하여 다시 칠하거나 시프트 라인 문제/틱 문제를 새로 고치거나 새로 고치는 것을 방지할 수 있습니까? 일종의 sy nergy를 만드나요? 찾아주셔서 감사합니다.

 
kenwa:
안녕하세요 mladen, 내부 사전 설정 기호를 사용하여 샘플 표시기를 첨부합니다. 내부에서 이해하기가 매우 어렵습니다. 이 표시기에서 힌트를 얻어 내 표시기 또는/& 귀하의 표시기에 적응하여 다시 칠하거나 시프트 라인 문제를 새로 고치는 것을 방지할 수 있습니까? 문제를 해결하거나 일종의 시너지 효과를 낼 수 있습니까? 찾아주셔서 감사합니다.

켄와

저는 디컴파일된 작업을 하지 않습니다. 죄송합니다

 
mladen:
kenwa 저는 디컴파일된 작업을 하지 않습니다. 죄송합니다

좋아, 그럼 나는 그것을 제거 하지만 흥미롭게도 왜 아무도 그것을 보지 않지만 당신은 그것이 decomplie 물건이라는 것을 알 수 있습니다

 
kenwa:
좋아, 그럼 나는 그것을 제거하지만 흥미롭게도 왜 아무도 그것을 보지 않지만 당신은 그것이 decomplie 물건이라는 것을 알 수 있습니다

코딩에 대해 조금 아는 사람은 모두 그것이 디컴파일된 코드라는 것을 알고 있습니다.

그리고 코딩에 대해 전혀 모르는 경우에도 다음과 같은 경우가 있습니다.

/*

EX4-TO-MQ4 디컴파일러 FREEWARE V4.0.451.1 [-]에 의해 생성됨

웹사이트: MetaTrader 5 거래 플랫폼 / MetaQuotes Software Corp.

이메일 : support@metaquotes.net

*/

당신이 게시한 표시기의 처음 몇 줄에 쓰여진 것은 그것이 디컴파일된 코드라는 것을 누구나 알 수 있을 것 같으니, 제발 ...

모두 제일 좋다

 

mladen, 내 코드는 디컴파일되지 않습니다. 간단히 살펴보시겠습니까?

 
Marbo:
mladen, 내 코드는 디컴파일되지 않습니다. 간단히 살펴보시겠습니까?

마르보

첨부한 것과 같이 하시면 됩니다. 목표 시간 표시줄당 한 번 또는 상태(경고 유형)가 변경되면 알려줍니다. 유형을 무시하려면 doAlert 프로시저에서 유형 검사 를 건너뛰십시오. 시간 확인을 건너뛰려면(이 경우 유형만 확인됨) doAlert 프로시저에서 시간 확인을 건너뜁니다.

파일:
test_4.mq4  3 kb
 

안녕하세요 mladen님

지난 주에 MA cross EA에 대해 도움을 요청했던 것을 기억할 것입니다. 물론 엘리트 섹션에 부적절하게 언급되었습니다. 어디에서 이것을 요청해야 한다고 제안할 수 있습니까? 나는 보았지만 명백한 대답을 찾지 못했습니다. 기억을 새로 고침하기 위해 이것은 사양이었습니다.

1.SMA EMA 크로스

2.촛불이 닫힐 때

3. 새로운 방향으로 새로운 주문을 하는 OCO

4. 미끄러짐 조정 기능

5. 십자가의 가청 신호

6.Cross는 설정 가능한 pip 간격이 없는 실제 십자가가 아닙니다.

7. 가능한 경우 캔들 내 모니터링이 가능하므로 캔들이 ATR(계산할 수 있는 설정 가능한 수)의 X배 이상이면 이 캔들 방향으로 알람이 울리면서 주문이 이루어지며 마찬가지로 주문을 마감하지만 시작하지 않습니다. 새로운

8. 바람직하게는 7과 같이 경보를 울리도록 명령한 경우

9.크로스의 신뢰성이 가장 중요합니다. 내 차트 - FXCM, Vantage, FX Choice - Universal Cross를 포함한 일부 EA는 거래를 받지 않거나 너무 늦습니다.

10. SL 설정 가능하지만 필요하지 않은 경우 생략 가능

11.트레일링 스톱

12.SL은 X핍 이익 후 자동으로 손익분기점으로 이동합니다.

13. 최대 오픈 거래 수

14. 매직넘버

문안 인사

제프