SimpleCandles/Optimization/Stage1.mq5

55 lines
5.8 KiB
MQL5
Raw Permalink Normal View History

2025-04-11 13:29:20 +03:00
<EFBFBD><EFBFBD>//+------------------------------------------------------------------+
//| Stage1.mq5 |
//| Copyright 2024-2025, Yuriy Bykov |
//| https://www.mql5.com/ru/users/antekov |
//+------------------------------------------------------------------+
#property copyright "Copyright 2024-2025, Yuriy Bykov"
#property link "https://www.mql5.com/ru/articles/17328"
#property description "!>25B=8: A >48=>G=K< M:75<?;O@>< B>@3>2>9 AB@0B5388 SimpleCandles."
#property description ""
#property description "!B@0B538O >B:@K205B ?>78F8N ?>A;5 =5A:>;L:8E >4=>=0?@02;5==KE A25G59."
#property description "B:@KB85 ?@>8AE>48B 2 AB>@>=C, ?@>B82>?>;>6=CN =0?@02;5=8N ?@54K4CI59 A25G8."
#property description ">78F88 70:@K20NBAO B>;L:> ?> SL 8;8 TP."
2025-04-11 15:19:04 +03:00
#property version "1.03"
2025-04-11 13:29:20 +03:00
// 1. ?@545;O5< :>=AB0=BC A 8<5=5< A>25B=8:0
#define __NAME__ "SimpleCandles" + MQLInfoString(MQL_PROGRAM_NAME)
// 2. >4:;NG05< =C6=CN AB@0B538N
2025-04-11 15:19:04 +03:00
#include "../Strategies/SimpleCandlesStrategy.mqh";
2025-04-11 13:29:20 +03:00
2025-04-11 15:19:04 +03:00
// 3. >4:;NG05< >1ICN G0ABL A>25B=8:0 ?5@2>3> MB0?0 87 181;8>B5:8 Adwizard
2025-04-24 22:18:33 +03:00
#include "../Include/Adwizard/Experts/Stage1.mqh"
2025-04-11 13:29:20 +03:00
//+------------------------------------------------------------------+
//| 4. E>4=K5 ?0@0<5B@K 4;O AB@0B5388 |
//+------------------------------------------------------------------+
sinput string symbol_ = ""; // !8<2>;
sinput ENUM_TIMEFRAMES period_ = PERIOD_CURRENT; // "09<D@59< 4;O A25G59
input group "=== 0@0<5B@K A83=0;0 : >B:@KB8N"
input int signalSeqLen_ = 6; // >;8G5AB2> >4=>=0?@02;5==KE A25G59
input int periodATR_ = 0; // 5@8>4 ATR (5A;8 0, B> TP/SL 2 ?C=:B0E)
input group "=== 0@0<5B@K >B;>65==KE >@45@>2"
input double stopLevel_ = 25000; // Stop Loss (2 4>;5 ATR 8;8 ?C=:B0E)
input double takeLevel_ = 3630; // Take Profit (2 4>;5 ATR 8;8 ?C=:B0E)
input group "=== 0@0<5B@K C?@02;5=85 :0?8B0;><"
input int maxCountOfOrders_ = 9; // 0:A. :>;8G5AB2> >4=>2@5<5==> >B@KBKE >@45@>2
input int maxSpread_ = 10; // 0:A. 4>?CAB8<K9 A?@54 (2 ?C=:B0E)
//+------------------------------------------------------------------+
//| 5. $C=:F8O D>@<8@>20=8O AB@>:8 8=8F80;870F88 AB@0B5388 |
//| 87 2E>4=KE ?0@0<5B@>2 |
//+------------------------------------------------------------------+
string GetStrategyParams() {
return StringFormat(
"class CSimpleCandlesStrategy(\"%s\",%d,%d,%d,%.3f,%.3f,%d,%d)",
(symbol_ == "" ? Symbol() : symbol_), period_,
signalSeqLen_, periodATR_, stopLevel_, takeLevel_,
maxCountOfOrders_, maxSpread_
);
}
//+------------------------------------------------------------------+