Build an EA using 2 Moving Average lines

MQL5 エキスパート

仕事が完了した

実行時間3 日
依頼者からのフィードバック
You completed very quickly and do what my expectation. Thank you
開発者からのフィードバック
Good job. Recommended user.

指定

Build an EA using 2 Moving Average lines

Name: MovingAverageEA

Source code: MT4, MT5 included.


SETTING

AssetItem:

- Current chart

MagicNumber:

- Default: 123456789

- User can change this number

MinLot:

- Minimum lot when making an order

- Default: 0.01

MaxLot:

- Maximum lot when making an order

- Default: 50

- Maximum value is 50

AccountCapital

- Default: 100$

- The money amount from the account

StopLoss

- Pip number.
- Default 20

Moving Average setting

MovingAverage_1

- MA1_Period: default = 10

- MA1_Shift:  default = 0

- MA1_Method: default = MODE_SMA

- MA1_Price: default = CLOSE_PRICE

MovingAverage_2

- MA2_Period: default = 1

- MA2_Shift:  default = -1

- MA2_Method: default = MODE_SMA

- MA2_Price: default = CLOSE_PRICE



Flow processing (please look at the picture to understand what I said)

- Only 1 order at the time

- MA2 cross up MA1, make a buy order. Close this order until the MA2 goes down MA1.

- MA2 goes down MA1, make a sell order. Close this order unitl the MA2 goes up MA1.

- Do not make 2 orders at the same time.

- If make a buy order, please close a previous sell order if exists.

- Before making a new order, EA has to re-calculate the volume

- Update stop loss processing: 
- Step 1: Get the maximum low/high price from 3 previous candlesticks to set the stop loss for buy/sell order.
- Step 2: calculate the stop loss number Math.abs(the price when making an order - price from step 1)
- Step 3: compare the value from step 2 with the [StopLoss] setting. use the bigger one
- Update the stop loss for the existing order when it moves to the next bar like the method above


Volume calculation

 - If account balance < [AccountCapital] => use [MinLot]

 - If Lot calculation > [MaxLot] => use [MaxLot] setting value
 
 Lot calculation use this form
 
 100$-200$ => 0.01

 200$-400$ => 0.02

 400$-800$ => 0.04

 800$-1600$ => 0.08

 1.600$-3.200$ => 0.16

 3.200$-6.400$ => 0.32

 6.400$-12.800$ => 0.64

 12.800$-25.600% => 1.28

 25.600$-51.200$ => 2.56

 51.200$-102.400$ => 5.12

 102.400$-204.800$ => 10.24

 204.800$-409.600$ => 20.48

 409.600$-819.200$ => 40.96

 > 819.200 => 50


Explain how to make a buy or sell


ファイル:

応答済み

1
開発者 1
評価
(39)
プロジェクト
50
18%
仲裁
5
40% / 40%
期限切れ
0
2
開発者 2
評価
(12)
プロジェクト
16
44%
仲裁
1
100% / 0%
期限切れ
0
3
開発者 3
評価
(56)
プロジェクト
92
62%
仲裁
0
期限切れ
4
4%
4
開発者 4
評価
(481)
プロジェクト
510
53%
仲裁
10
60% / 20%
期限切れ
3
1%
5
開発者 5
評価
(197)
プロジェクト
320
35%
仲裁
64
13% / 56%
期限切れ
83
26%
6
開発者 6
評価
(8)
プロジェクト
11
0%
仲裁
11
18% / 73%
期限切れ
2
18%
7
開発者 7
評価
(383)
プロジェクト
411
69%
仲裁
3
100% / 0%
期限切れ
2
0%
多忙
8
開発者 8
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
9
開発者 9
評価
(34)
プロジェクト
60
23%
仲裁
11
73% / 9%
期限切れ
3
5%
10
開発者 10
評価
(10)
プロジェクト
13
8%
仲裁
3
67% / 33%
期限切れ
0
類似した注文
Zzz 30+ USD
// กำหนดค่าตัวแปรพื้นฐาน input double lotSize = 0.1; // ขนาดล็อตที่ต้องการ input int takeProfit = 50; // ระยะ Take Profit (จุด) input int stopLoss = 50; // ระยะ Stop Loss (จุด) input int magicNumber = 123456; // หมายเลข Magic Number input int smaPeriod = 14; // ช่วงเวลา Simple Moving Average (SMA) // เวลาที่ออเดอร์ล่าสุดถูกเปิด datetime lastOrderTime = 0; // ฟังก์ชั่นหลักของ EA void OnTick() { //
Mobile robot 50 - 100 USD
I want a profitable scalping EA robot for mt5 and mobile phones (licence key should be provided).the video link attached below indicates how the EA robot should operate it.it analyses the market before taking trades and it trades candle to candle .also coding samples are provided on the video .it should be applicable to all timeframes.it should trade indices(Nas100,US30,S&p500,GER30,)
I use the translator I hope to make myself understood. I'm looking for a cyclical indicator. mt5. I attach videos to understand how it works. to be inserted at any point of the graph. It is possible to change the color and thickness of the line
This EA must have the following functions together: BE: place BE when the price reach a certain gain in PIPS and you can choose the offset too, so, for example it activates after 10 pips with 1 pip of offset so you can have profit with BE too Auto SL and TP Can manage the trades made by phone when MT5 is open in the PC or VPS Trailing stop (step by step): I can decide at what number of pips the trailing stop get
This is a strategy based on crossing two trend indicators on the second timeframe (1s, for example). We work not only with the market but with the limit orders as well (robot must "read" an order book). Read the whole instruction please for more details. Speak Russian, English
Martingale EA for MT5 30 - 100 USD
Criteria: Only one trade at a time. Cannot open another trade if one is running Trade on EURUSD only, once job is completed I will be happy to schedule more for other pairs You choose entry strategy and criteria win rate must be above 50% in long term backtest of EURUSD Every trade has got TP and SL Trades to last about a day, few trades a week, at least 10 pips gain per trade, so that it can be launched on normal
I have a indicator, mql file. The signals are seen below on a EURNZD H1 chart. Very important to get accurate entries. The signal to trade is the first tic after the the indicator signal paints. I've tried to demonstrate that below. Other than that the EA will have a lot size escalation, an on-screen pip counter, a button to stop taking new trades, SL/TP, and magic number. I would like the indicator to be within the
I would like to create an EA based on the Shved Supply and Demand indicator. you can find the Shved Supply and Demand v1.7 indicator in the following link https://www.mql5.com/en/code/29395 NB: Checks the trading robot must pass before publication in the Market ( https://www.mql5.com/en/articles/2555 ) MQ5 file to be provided
Im looking for an coder to code an EA: Trade management 1. opening trades according to the indicator 2. trades settings to choose from like: open all trades according to the signal open only trade 1,2,3 or 4 % per trade ( example 50/30/20 of the lot settings, with 4 trades it would be for example 50/30/10/10) 3. SL/Trailing settings: Move SL to entry after hitting TP1/TP2 or TP3 moving SL by % keep the original SL
Hi I'm looking to have 2 of my pinescript strategies converted to MQL5 and was wondering if you could first give me a quote for the more simple strategy and then for both the simple and complex strategy together. The simple strategy is a MACD crossover type thing that uses a special EMA script that filters out some ranging price action and also fractal candles for the stop loss. The second strategy is market

プロジェクト情報

予算
50 - 100 USD
開発者用
45 - 90 USD
締め切り
最低 1 最高 3 日