거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
스크립트

The intersections of two lines - MetaTrader 4용 스크립트

조회수:
8119
평가:
(11)
게시됨:
2021.01.12 23:32
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

A friend asked a question, which became an excuse for me to play some memory with the math lessons of years ago! 😊 (Then say what is the use of high school arithmetic and geometry; this is a very practical example of the same course 😉)


In MetaTrader 4, we intend to calculate the intersection coordinates of two straight line objects with different slopes using MQL4.


I will give a general explanation:

If the horizontal axis of the chart means time X and the vertical axis of the chart means price Y. For each line on the chart having two points from it or one point and the slope of the line, get the equation of those two lines.

Finally we have a set of equations, which, by mathematical calculations and writing one variable on another and substituting it for another function, gives the values ​​of X and Y, which are the coordinates of the intersection of two lines.


I tried to solve the problem with a few simple and clean lines of code, which also has an educational aspect, I also put down the source code file.




Translate by google translate.

Telegram: @JahanChart


    Send a message from metatrader to telegram Send a message from metatrader to telegram

    With this script, you can send a message from MetaTrader 4 to Telegram.

    Smart Forex System Open Version Smart Forex System Open Version

    Force=((Bid-close)/close)*10000;

    Corrected moving averages Corrected moving averages

    Corrected moving averages

    Log4mql(mini) MT4 Log4mql(mini) MT4

    A light header-only version of Log4mql that provides standardized logging.