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

Beginner Programming: Moving Average Crossover with and without Martingale functionality - MetaTrader 5용 expert

조회수:
5125
평가:
(7)
게시됨:
2024.06.10 09:35
업데이트됨:
2024.06.10 18:11
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동


All of the functions used in the Expert Advisor are found in the ImportantFunctions.mqh include file.

There are 2 Expert Advisors, both using the price crossing the moving average as their entry signal, with a simple difference: one uses Martingale when losses occur, and the other does not.

I don't recommend using any of the EAs with a live account, they are made for demonstration purposes only.

Simple Moving Average EA Inputs:

  • MAPeriod: The period of the Moving Average indicator.
  • LotSize: The lot size used to enter trades.
  • TPPoints: Take profit points.
  • SLPoints: Stop loss points.

Moving Average EA with Martingale Inputs:

  • MAPeriod: The period of the Moving Average indicator.
  • StartingLot: The lot size used to enter the first trade; this value will increase after a loss.
  • MaxLot: The maximum lot size. The StartingLot can be increased until this value.
  • TPPoints: Take profit points. This will increase after a loss.
  • SLPoints: Stop loss points. This will increase after a loss.
  • LotMultiplier: The lot size will be multiplied by this value after a loss if it has not reached the MaxLot value yet.
  • TPMultiplier: The Take profit and Stop loss will both increase by this amount after a loss, providing a recovery edge not only through position sizing but also because of the bigger TP.

The code contains comments, and I've made a YouTube video explaining everything you need to understand.

Thanks for reading!

Moving Average without Martingale


Moving Average With Martingale

Lesson 9 Buy sell stop Order Lesson 9 Buy sell stop Order

This is a lesson on buying or selling with pending orders stop

Lesson 7 Price action Ket hop Volume VSA Lesson 7 Price action Ket hop Volume VSA

This is a lesson on trading using price action combined with volume.

MovingAverages.mqh Part I MovingAverages.mqh Part I

MovingAverages.mqh Part I A multi timeframe version is available with colors for orientation, for developers or profitable traders for free. Offer under conditions. Other multi timeframe indicators are also available.

Screenshots with keyboard key press Screenshots with keyboard key press

Capture widescreen screenshots by pressing the 's' hotkey on the keyboard