묻다! - 페이지 37

 

도달할 수 없습니다! metatrader.info를 등록했지만 아직 액세스 권한이 없는 것 같습니다.

 

알겠습니다.... 흠 저는 프로그래밍 초보자입니다... asctrend_sound.mq4에 있는 것과 같은 구매/판매 신호 에 대한 기존 표시기에 코드의 어떤 부분을 추가해야 하는지에 대한 지침이 명확하지 않습니다... 컴파일 오류가 발생합니다...

 

하이씨지,

sleep() 함수는 EA에서만 호출할 수 있다고 생각합니다. 사용자 지정 표시기 에서 호출할 수 있는 유사한 함수가 있습니까? 감사합니다.

 

안녕, 코더스구루!

나는 당신의 수업을 살펴 보았고 포함 파일 사용에 대해 아무것도 눈치 채지 못했습니다. 개념은 저에게 새롭습니다. 그리고 당신이 파일에서 잘못하고있는 것을 설명 할 수 있는지 궁금합니다. 사용. 인클루드 파일에 대한 교훈을 얻을 수 있을까요?

내가 한 작업(110개의 오류가 있습니까?)

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

//| Day Off.mq4.mq4 |

//| Eaglehawk |

//| https://www.forex-tsd.com/suggestions-trading-systems/3191-day-off-safety-detector.html |

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

#property copyright "Eaglehawk"

#property link "https://www.forex-tsd.com/suggestions-trading-systems/3191-day-off-safety-detector.html"

//Global Variables

//I used variables to manually put in when Good Friday occurs, (I dont think it's possible to automate cycles of the moon, if you think so, go for it. I am, after all, a newcomer to coding )

extern int GoodFridaysMonth = 4; //Used to see what month Good Friday is in. (either 4 or 5)

extern int GoodFridaysDay = 12; //says the day of the month good friday is on.

bool DayOff = False; // the days interbankfx takes off

bool DayOffClose = False; //operates the last minute close if none of the minimization techniques are met by the deadline

//local variables (both used to determine what trend we are in)

double CurrentClose = iClose(NULL, 0, 1); //looks at the close of the most recent period

double TrendClose = iClose(NULL, 0, 3); //looks at the close of three periods

/*Counts the DayOff Function as true about two days before the time interbankfx is not running, (you can edit this to how fast you think your individual strategy will take to close)

In case this code is tampered with, the dates interbankfx takes off are here

New Years Day January 1

Martin Luther King Jr. Day January 20

Washington's Birthday February 17

Good Friday Friday before Easter

Memorial Day May 26

Independence Day July 4

Labor Day September 1

Thanksgiving Day Fourth Thurday of November

Christmas December 25*/

//DayOff variable tests

if ( Month() == 12 && Day() >= 30 || Month() == 1 && Day() <= 1 ) //New Years Day

{

DayOff = True;

}

if (Month() == 1 && (Day() >= 18 && Day() <= 20)) //Martin Luther King Jr. Day

{

DayOff = True;

}

if (Month() == 2 && (Day() >= 15 && Day() <= 17)) //Washington's Birthday

{

DayOff = True;

}

if (Month() == GoodFridaysMonth && (Day() = GoodFridaysDay - 2)) //Good Friday

{

DayOff = True;

}

if (Month() == 5 && (Day() >= 24 && Day() <= 26)) //Memorial Day

{

DayOff = True;

}

if (Month() == 7 && (Day() >= 2 && Day() <= 4)) //Independece Day

{

DayOff = True;

}

if ( Month() == 8 && Day() >= 30 || Month() == 9 && Day()== 1 ) //Labor Day

{

DayOff = True;

}

if (Month() == 11 && (DayOfWeek() >= 3 && DayOfWeek() =21) //Thanksgiving Day

{

DayOff = True;

}

if (Month() == 12 && (Day() >= 23 && Day() <= 25)) //Christmas Day

{

DayOff = True;

}

//DayOffClose variable tests, currently set to 9:00 P.M.

if (Month() == 12 && Day() == 31 && Hour() == 21) //New Years Day

{

DayOffClose = True;

}

if (Month() == 1 && (Day() == 19 && Hour() <= 21)) //Martin Luther King Jr. Day

{

DayOffClose = True;

}

if (Month() == 2 && Day() == 16 && Hour() == 21) //Washington's Birthday

{

DayOffClose = True;

}

if ( Month() == GoodFridaysMonth && Day() == GoodFridaysDay - 1 && Hour() == 21) //Good Friday

{

DayOffClose = True;

}

if (Month() == 5 && Day() == 25 && Hour() == 21) //Memorial Day

{

DayOffClose = True;

}

if (Month() == 7 && Day() == 3 && Hour() == 21) //Independece Day

{

DayOffClose = True;

}

if (Month() == 8 && Day()== 31 && Hour() == 21) //Labor Day

{

DayOffClose = True;

}

if (Month() == 11 && Day() >=21 && DayOfWeek() <=6) //Thanksgiving Day

{

DayOffClose = True;

}

if (Month() == 12 && Day() == 24 && Hour() == 21) //Christmas Day

{

DayOffClose = True;

}

//these next two functions will minimize loss on long, non-profitable trades before the close of interbankfx

if (DayOff == True && Ask-OrderOpenPrice() 0)

{

TrailingStopMode = True;

}

if (DayOff == True && Ask-OrderOpenPrice() < 0 && CurrentClose - TrendClose < 0)

{

Order = SIGNAL_CLOSEBUY;

}

//these next two functions will minimize loss on short, non-profitable trades before the close of interbankfx

if (DayOff == True && OrderOpenPrice()-Bid <0 && CurrentClose - TrendClose < 0)

{

TrailingStopMode = True;

}

if (DayOff == True && OrderOpenPrice()-Bid 0)

{

Order = SIGNAL_CLOSESELL;

}

//this next function will end all trades if not closed by 9:00 P.M. the day before the close of interbankfx

if (DayOffClose == True)

{

Order = SIGNAL_CLOSESELL;

}

if (DayOffClose == True)

{

Order = SIGNAL_CLOSEBUY;

}

//post this at the end of all your open Logics

if (/*your open logics*/ && DayOff == False) //order open

//post this as one of your exit short logics, closes trades when they are profitable

if (DayOff == True && OrderOpenPrice()-Bid >0)

{

Order = SIGNAL_CLOSESELL;

}

//post this as one of your exit long logics, also closes profitable trades.

if (DayOff == True && Ask-OrderOpenPrice() >0)

{

Order = SIGNAL_CLOSEBUY;

}

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

안녕! 현재 차트 창의 상단과 하단을 어떻게 얻을 수 있는지 알고 싶습니다.

현재 차트 창의 상단과 하단(픽셀 및 가격)을 얻는 방법이 있습니까?

다른, MetaTrader4에서 widows API로 타이머 프로시저를 만드는 방법은 무엇입니까?

 

MT4용 .NET DLL을 사용할 수 있습니까?

사용하는 방법?

 

EA는 지표를 기반으로 하기 때문에 지표 작성에 대한 더 많은 정보가 있으면 좋을 것입니다. Alpari에는 좋은 튜터가 몇 명 있지만 러시아어로 되어 있습니다.

http://www.alpari-idc.ru/ru/experts/articles/14.html

 

Period_Converter_opt 도움말

"저는 차트에 연결된 이 기간 변환기를 사용하여 실시간으로 사용자 지정 차트를 업데이트합니다. 동일한 사용자 지정 기간의 여러 차트를 열면 하나의 차트만 실시간으로 업데이트된다는 점을 제외하면 훌륭하게 작동합니다. 다른 차트는 오프라인으로 표시되고 다음으로만 업데이트됩니다. 새로 고침 메뉴 옵션.예를 들어, 2개 또는 3개의 16M 차트를 열면 하나만 새 눈금으로 업데이트되고 나머지는 수동으로 새로 고쳐야 합니다. 이 제한이 의도적으로 설계된 것입니까?(Period_Converter_Opt) 이 상황에 대한 해결 방법이 있습니까? 누구나?"

이전에 다른 스레드에 게시했습니다. 이것에 대한 아이디어가 있습니까?

건배,

디비

 

Period_converter_Opt 코드

이전 게시물에 대한 확장:

코드를 간략하게 살펴보았고 내 호기심은 다음과 같습니다. 동일한 기호 및 시간 프레임으로 여러 개의 창이 열린 경우 WindowHandle이 반환하는 것입니다.

if(hwnd == 0) {

//업데이트를 위해 차트 창을 감지하는 중입니다....오프라인 창

hwnd = WindowHandle(Symbol(), NewPeriod);

}

건배,

디비

 

3 구매 3 스트래들 스크립트 또는 EA-판매 중이 있습니까?

안녕하세요 CG도 그렇고 뉴디지털도 그렇고요.

매개 변수 를 입력하면 가격 수준을 수동으로 입력하여 지정된 수준에서 SL 및 TP와 거래 위에 배치할 EA 또는 스크립트를 찾고 있습니다.

기본적으로 스트래들 x 3.

그런 곳이 어디인지 아십니까?

감사합니다.

이안.

사유: