코딩 도움말 - 페이지 226

 

친애하는 훌륭한 프로그래머 여러분,

매 주기 시작 시 오픈 전용 매수 또는 매도 주문만 가능하도록 이 E를 수정하도록 도와주세요.

내 영어에 대해 미안 해요.

감사해요

Mark010 breakouthedge.mq4

파일:
 
Mark010:
친애하는 훌륭한 프로그래머 여러분,

매 주기 시작 시 오픈 전용 매수 또는 매도 주문만 가능하도록 이 E를 수정하도록 도와주세요.

내 영어에 대해 죄송합니다.

감사해요

Mark010 breakouthedge.mq4

마크010

원본 소스 코드가 있습니까? 그것은 디컴파일된 코드이며 디컴파일된 코드 변경에 대해 도움을 받을 수 있을지 의심됩니다.

 

나는 그것을 가지고 있지 않다.

어쨌든 고마워

 
mladen:
elcomepips 여기 있습니다

헤이 mladen,

코딩 잘하신거 봤습니다. EA를 만들려면 iCustom()으로 어떤 버퍼를 가져와야 하나요? 길거나 짧게 가야만 하는지 알고 싶을 뿐입니다.

미리 감사드립니다.

 
arroganzmaschine:
헤이 mladen,

코딩 잘하신거 봤습니다. EA를 만들려면 iCustom()으로 어떤 버퍼를 가져와야 하나요? 길거나 짧게 가야만 하는지 알고 싶을 뿐입니다.

미리 감사드립니다.

아로간즈마신

이를 위해 버퍼 2를 사용할 수 있습니다. 값이 1이면 추세가 상승하고 값이 -1이면 추세가 하락합니다. 코드는 다음과 같을 수 있습니다.

double currentTrend = iCustom(NULL,0,"MA crosses arrows_alerts mtf","",FastMa,FastMaShift,FastMAMethod,FastMAPrice,SlowMa,SlowMaShift,SlowMAMethod,SlowMAPrice,2,1);

double previousTrend = iCustom(NULL,0,"MA crosses arrows_alerts mtf","",FastMa,FastMaShift,FastMAMethod,FastMAPrice,SlowMa,SlowMaShift,SlowMAMethod,SlowMAPrice,2,2);

if (currentTrend != previousTrend)

{

if (currentTrend == 1) // buy signal

if (currentTrend == -1) // sell signal

}

 
mladen:
아로간즈마신

이를 위해 버퍼 2를 사용할 수 있습니다. 값이 1이면 추세가 상승하고 값이 -1이면 추세가 하락합니다. 코드는 다음과 같을 수 있습니다.

double currentTrend = iCustom(NULL,0,"MA crosses arrows_alerts mtf","",FastMa,FastMaShift,FastMAMethod,FastMAPrice,SlowMa,SlowMaShift,SlowMAMethod,SlowMAPrice,2,1);

double previousTrend = iCustom(NULL,0,"MA crosses arrows_alerts mtf","",FastMa,FastMaShift,FastMAMethod,FastMAPrice,SlowMa,SlowMaShift,SlowMAMethod,SlowMAPrice,2,2);

if (currentTrend != previousTrend)

{

if (currentTrend == 1) // buy signal

if (currentTrend == -1) // sell signal

}

FastMa 등을 어떻게 정의해야 합니까? 존재하지 않기 때문에 작동하지 않습니다.

 
arroganzmaschine:
FastMa 등을 어떻게 정의해야 합니까? 존재하지 않기 때문에 작동하지 않습니다.

그것들을 외부 변수로 선언해야 합니다(지표 매개변수 에서와 정확히 동일). 이와 같이 :

extern int FastMa = 5;

extern int FastMaShift = 0;

extern int FastMAMethod = MODE_LWMA;

extern int FastMAPrice = PRICE_CLOSE;

extern int SlowMa = 13;

extern int SlowMaShift = 0;

extern int SlowMAMethod = MODE_LWMA;

extern int SlowMAPrice = PRICE_CLOSE;

위 코드의 값 대신 원하는 기본값을 사용하십시오.

 
mladen:
외부 변수로 선언해야 합니다(지표 매개변수에서와 정확히 동일). 이와 같이 :
extern int FastMa = 5;

extern int FastMaShift = 0;

extern int FastMAMethod = MODE_LWMA;

extern int FastMAPrice = PRICE_CLOSE;

extern int SlowMa = 13;

extern int SlowMaShift = 0;

extern int SlowMAMethod = MODE_LWMA;

extern int SlowMAPrice = PRICE_CLOSE;

위 코드의 값 대신 원하는 기본값을 사용하십시오.

매우 감사합니다! currentTrend==1인 경우 어떻게 하나의 주문만 할 수 있습니까?

대량 주문을 개시하고 싶지 않습니다.

 
arroganzmaschine:
매우 감사합니다! currentTrend==1인 경우 어떻게 하나의 주문만 할 수 있습니까? 대량 주문을 개시하고 싶지 않습니다.

OrdersTotal() < 1을 사용하거나 현재 기호 및 매직 번호에 대해 일부 주문 계산 기능을 사용하십시오.

 

안녕 Mladen.당신은 이 지표를 버전으로 만들었습니다. 가능하면 다른 지표의 예와 같이 여기에서 별도로 이동 평균 을 만들어 달라고 요청하고 싶습니다.

고맙습니다.

파일: