spacex_prop_ea@lifeindreamsworld.mq4
Похожие материалы по тегам
Сообщите нам, если считаете, что материал размещён без разрешения.
Сообщить о материале
Обращение по товару «spacex_prop_ea@lifeindreamsworld.mq4» отправится на рассмотрение. Укажите контакт для ответа и опишите причину.
О программе
SpaceX_Prop_EA — торговый советник для MetaTrader 4, работающий на выбранном таймфрейме. Советник использует две скользящие средние (MA1Period и MA2Period) для определения направления тренда и входных сигналов с порогами Delta1 и Delta2. Поддерживает сеточную торговлю, режимы мартингейла с умножением лота, трейлинг-стоп, а также фильтрацию по спреду и избегание новостного времени. Имеет настройки выхода по пипсовой прибыли, проценту убытка и условному закрытию позиций.
Настройки программы
| Настройка | Описание |
|---|---|
| Trading Strategy (Strategy) | Стратегия — Выбор торговой стратегии из перечисленных режимов |
| Galaxy Profit (EAComment) | Комментарий EA — Текстовый комментарий, добавляемый к ордерам |
| TimeFrame | Таймфрейм — Таймфрейм для анализа ценовых данных |
| Prop Firm Target (CloseAtPipsProfits) | Цель по пипсам — Метка цели закрытия по пипсовой прибыли |
| Challenge Prop Mode (UseCloseAtPipsProfits) | Использовать закрытие по пипсам — Включает режим принудительного закрытия при достижении пипсовой цели |
| Pitchfan Mode (Martingale1) | Мартингейл 1 — Первый режим мартингейла (Pitchfan) |
| Fixed Lot Size (FixedLots) | Фиксированный лот — Размер фиксированного лота для сделок |
| Elliott Triple Combo Wawe (WXYXZ) (MaxSpread) | Максимальный спред — Порог спреда, при превышении которого торговля блокируется |
| Three Drives Pattern (Delta2) | Дельта 2 — Второй порог отклонения для подтверждения сигнала |
| Pass Prop Firm Mode (UseGrid) | Использовать сетку — Включает сеточную торговлю с шагом GridPips |
| Gann Square Fixed (Martingale2) | Мартингейл 2 — Второй режим мартингейла (Gann Square) |
| Max Drawdown (ClosePercentLoss) | Порог убытка — Метка ограничения максимального процентного убытка |
| Forced Exit Mode (CloseAtPercentLoss) | Закрытие по проценту убытка — Включает принудительное закрытие при превышении лимита убытка |
| Forced Exit % (PercentLoss) | Процент убытка — Процентный лимит убытка от баланса для принудительного выхода |
| XABCD Pattern (MA2Period) | Период MA 2 — Период второй скользящей средней |
| Elliott Double Combo Wave (WXY) (Slippage) | Слиппаж — Допустимое отклонение цены при открытии ордера |
| Prop Settings (Trade_Parameters) | Параметры торговли — Метка группы настроек торговли |
| Stop Loss (StopLoss) | Стоп-лосс — Размер стоп-лосса в пунктах |
| Take Profit (TakeProfit) | Тейк-профит — Размер тейк-профита в пунктах |
| Recovery (GridPips) | Шаг сетки — Расстояние между сеточными ордерами в пипсах |
| All Broker (ECN_Acc) | ECN-счёт — Режим работы с ECN-счётом (модификация ордеров через OrderSend) |
| Spread Alert (SpreadAlert) | Оповещение о спреде — Включает уведомления при превышении максимального спреда |
| Magic Number (MagicNumber) | Магический номер — Идентификатор ордеров советника |
| Max Open Trade Allowed (MaxOpenOrders) | Макс. открытых ордеров — Максимальное количество одновременно открытых сделок |
| Show info (ShowInfo) | Показать информацию — Включает отображение информационной панели на графике |
| Fib Speed Resistance Fan (MA1Period) | Период MA 1 — Период первой скользящей средней |
| Trailing Stop Settings (TrailingStop) | Трейлинг-стоп — Метка настроек трейлинг-стопа |
| Use Trailing Stop (UseTrailingStop) | Использовать трейлинг-стоп — Включает режим трейлинг-стопа |
| Trailing Stop Start (TrailingStopStart) | Старт трейлинг-стопа — Расстояние в пунктах, при достижении которого начинается трейлинг |
| Trailing Stop Step (TrailingStopStep) | Шаг трейлинг-стопа — Шаг смещения стоп-лосса при трейлинге в пунктах |
Поиск по коду файла
#property version "VIP";
#property strict
#property description "Prop Firm EA";
#import "stdlib.ex4"
string ErrorDescription(int);
bool CompareDoubles(double,double);
#import
enum SG
{
Trend = 1, // Prop Firm Challenge
Trend1 = 2, // Real Prop Account
Trend2 = 3 // Fast Scalper
};
extern SG Strategy = Trend; // Trading Strategy
extern string EAComment = "SpaceX_Prop_EA"; // Galaxy Profit
extern ENUM_TIMEFRAMES TimeFrame = PERIOD_M15;
extern string CloseAtPipsProfits = "Prop Phase Target 10%"; // Prop Firm Target
extern bool UseCloseAtPipsProfits = true; // Challenge Prop Mode
extern bool Martingale1; // Pitchfan Mode
extern double FixedLots = 0.01; // Fixed Lot Size
extern double MaxSpread = 35; // Elliott Triple Combo Wawe (WXYXZ)
extern int Delta2 = 300; // Three Drives Pattern
extern bool UseGrid = true; // Pass Prop Firm Mode
extern bool Martingale2; // Gann Square Fixed
extern string ClosePercentLoss = " Max Drawdown Limit "; // Max Drawdown
extern bool CloseAtPercentLoss; // Forced Exit Mode
extern double PercentLoss = 5; // Forced Exit %
extern int MA2Period = 89; // XABCD Pattern
extern int Slippage = 1; // Elliott Double Combo Wave (WXY)
extern string Trade_Parameters = "Pass Challenge"; // Prop Settings
extern double StopLoss; // Stop Loss
extern double TakeProfit; // Take Profit
extern double GridPips = 25; // Recovery
extern bool ECN_Acc = true; // All Broker
extern bool SpreadAlert; // Spread Alert
extern int MagicNumber = 123; // Magic Number
extern int MaxOpenOrders = 10; // Max Open Trade Allowed
extern bool ShowInfo = true; // Show info
extern int MA1Period = 49; // Fib Speed Resistance Fan
extern string TrailingStop = " Trailing Stop "; // Trailing Stop Settings
extern bool UseTrailingStop; // Use Trailing Stop
extern double TrailingStopStart = 30; // Trailing Stop Start
extern double TrailingStopStep = 15; // Trailing Stop Step
extern int PipsProfit = 50; // Prop Daily Pips
extern string MM_Parameters = " Prop Money Management "; // Prop Money Management.
extern double MultiplierLot = 2; // Lot Multiplier
extern bool LotIncrease; // Lot Increase
extern double Increase = 0.01; // Increase
extern double BalansStep = 1000; // Balance Step
extern int Delta1 = 200; // Elliot impulse Wawe
extern string Time_Filter = "Trade Time"; // Trade Time Settings
extern bool EnableTimer; // Trade Time (Server Time)
extern string TimerStart = "00:15:00"; // Time Start
extern string TimerEnd = "09:00:00"; // Time End
extern string _News = "Avoid News Time";
extern bool AvoidNews = true; // Avoid News
extern int UTimeDo = 30; // News Time Before
extern int UTimePosle = 30; // News Time After
extern int Uoffset = 3; // Offset
extern bool Vhigh = true; // High
extern bool Vmedium; // Medium
extern bool Vlow; // Low
class SMBIOS
{
public:
};
bool returned_b;
bool Ib_002B2;
bool Ib_002B4;
int Ii_0083C;
int Ii_00840;
int Ii_00844;
int Ii_00848;
int Ii_0084C;
int Ii_00850;
int Ii_00854;
int Ii_00858;
int Ii_0085C;
int Ii_00860;
int Ii_00864;
int Ii_00868;
string Is_00870;
int Ii_0087C;
int Ii_00880;
int Ii_00884;
int Ii_00888;
int Ii_00278;
bool Ib_003B4;
string Is_00410;
int Ii_003E0;
double Id_00428;
bool Ib_0088C;
string Is_00890;
bool Ib_0089C;
int Ii_008A0;
string Is_008A8;
bool Ib_008B4;
double Id_008B8;
bool Ib_002B1;
bool Ib_002B3;
double Id_001F8;
double Id_008C0;
int Ii_001E4;
int Ii_00204;
string Is_00210;
long Il_008C8;
int Ii_008D0;
bool Ib_0023C;
string Is_00230;
string Is_00240;
long Il_008D8;
bool Ib_00198;
int Ii_000F8;
int Ii_000F4;
int Ii_00144;
int Ii_0013C;
int Ii_00140;
int Ii_0018C;
string Is_000E8;
string Is_00100;
string Is_00110;
string Is_00120;
string Is_00130;
string Is_00180;
string Is_00160;
string Is_00170;
string Is_00148;
double Id_00398;
double Id_003A8;
double Id_008E0;
bool Ib_00272;
int Ii_008E8;
int Ii_008EC;
int Ii_008F0;
int Ii_008F4;
int Ii_0019C;
int Gi_00000;
int Ii_001A4;
long Gl_00001;
int Ii_001B0;
int Ii_001B4;
int Ii_001C0;
int Ii_001C4;
int returned_i;
int Ii_001CC;
long returned_l;
long Il_001D0;
int Ii_001D8;
int Ii_001DC;
int Ii_001E0;
double Ind_004;
double Ind_000;
bool Gb_00001;
int Ii_00208;
double Gd_00001;
int Ii_001A0;
long Gl_00000;
bool Ib_00258;
long Il_00260;
bool Ib_00270;
bool Ib_00200;
bool Ib_00271;
double Gd_00003;
double Id_010A0;
bool Ib_00273;
bool Ib_00274;
double Id_00280;
double Id_00288;
bool Ib_00290;
bool Ib_00291;
double Id_00298;
bool Ib_002A1;
bool Ib_002A2;
double Id_002A8;
bool Ib_002B0;
int Ii_002B8;
double Id_002C0;
double Id_002C8;
double Id_002D0;
int Ii_002D8;
int Ii_002DC;
int Ii_002E0;
int Ii_002E4;
int Ii_002E8;
double Id_002F0;
int Ii_002F8;
double Id_00300;
double Id_00308;
double Id_00310;
int Ii_00318;
int Ii_0031C;
int Ii_00320;
int Ii_00324;
int Ii_00328;
double Id_00330;
int Ii_00338;
int Ii_0033C;
int Ii_00340;
int Ii_00344;
int Ii_00348;
int Ii_0034C;
int Ii_00350;
int Ii_00354;
int Ii_00358;
int Ii_0035C;
int Ii_00360;
bool Ib_00364;
int Ii_00368;
int Ii_0036C;
long Il_00370;
bool Ib_00378;
int Ii_0037C;
int Ii_00380;
long Il_00388;
double Id_00390;
double Id_003A0;
int Gi_00003;
bool Ib_003B5;
int Ii_003B8;
int Ii_003BC;
long Il_003C0;
bool Ib_003C8;
int Ii_003CC;
int Ii_003D0;
long Il_003D8;
double Id_003E8;
double Id_003F0;
double Id_00420;
double Id_00430;
double Id_00450;
int Ii_00460;
int Ii_00464;
int Ii_00468;
int Ii_0046C;
int Ii_00470;
int Ii_00474;
int Ii_00478;
int Ii_0047C;
int Ii_00480;
int Ii_00484;
int Ii_00488;
bool Ib_0048C;
int Ii_00490;
int Ii_00494;
long Il_00498;
bool Ib_004A0;
int Ii_004A4;
int Ii_004A8;
long Il_004B0;
double Id_004B8;
bool Ib_004C4;
int Ii_004C8;
int Ii_004CC;
long Il_004D0;
bool Ib_004D8;
int Ii_004DC;
int Ii_004E0;
long Il_004E8;
double Id_004F0;
double Id_00510;
double Id_00518;
double Id_00520;
double Id_00540;
double Id_00548;
bool Gb_00003;
int Ii_00554;
int Ii_00558;
int Ii_0055C;
int Ii_00560;
int Ii_00564;
int Ii_00568;
int Ii_0056C;
int Ii_00570;
int Ii_00574;
int Ii_00578;
bool Ib_0057C;
int Ii_00580;
int Ii_00584;
long Il_00588;
bool Ib_00590;
int Ii_00594;
int Ii_00598;
long Il_005A0;
double Id_005A8;
double Id_005B0;
bool Ib_005BC;
int Ii_005C0;
int Ii_005C4;
long Il_005C8;
bool Ib_005D0;
int Ii_005D4;
int Ii_005D8;
long Il_005E0;
double Id_005E8;
double Id_005F0;
double Id_00610;
double Id_00618;
double Id_00638;
int Ii_0064C;
int Ii_00650;
int Ii_00654;
int Ii_00658;
int Ii_0065C;
int Ii_00660;
int Ii_00664;
int Ii_0066C;
int Ii_00670;
int Ii_00674;
bool Ib_00678;
int Ii_0067C;
int Ii_00680;
long Il_00688;
bool Ib_00690;
int Ii_00694;
int Ii_00698;
long Il_006A0;
double Id_006A8;
bool Ib_006B4;
int Ii_006B8;
int Ii_006BC;
long Il_006C0;
bool Ib_006C8;
int Ii_006CC;
int Ii_006D0;
long Il_006D8;
double Id_006E0;
double Id_00700;
double Id_00708;
double Id_00710;
double Id_00730;
bool Ib_00740;
string Is_00748;
double Id_00758;
double Id_00760;
double Id_00768;
double Id_00770;
double Id_00778;
double Id_00780;
double Id_00788;
double Id_00790;
double Id_00798;
double Id_007A0;
double Id_007A8;
double Id_007B0;
double Id_007B8;
double Id_007C0;
double Id_007C8;
double Id_007D0;
double Id_007D8;
double Id_007E0;
double Id_007E8;
double Id_007F0;
double Id_007F8;
double Id_00800;
long Gl_00003;
int Gi_00001;
int Gi_00002;
long Gl_00002;
string Gs_00000;
int Ii_0015C;
string Is_00000;
string Is_00010;
string Is_00020;
long Il_00030;
short Ist_00038;
short Ist_0003A;
string Is_00088;
string Is_00098;
string Is_000A8;
string Is_000B8;
string Is_000C8;
string Is_000D8;
bool Ib_00154;
bool Ib_00155;
int Ii_00158;
long Il_00190;
bool Ib_00199;
long Il_001A8;
long Il_001B8;
int Ii_001C8;
double Id_001E8;
double Id_001F0;
double Id_00220;
long Il_00228;
long Il_00250;
long Il_00268;
bool Ib_002A0;
int Ii_003B0;
int Ii_003F8;
double Id_00400;
int Ii_00408;
int Ii_00438;
double Id_00440;
int Ii_00448;
double Id_00458;
int Ii_004C0;
int Ii_004F8;
double Id_00500;
int Ii_00508;
int Ii_00528;
double Id_00530;
int Ii_00538;
bool Ib_00550;
int Ii_005B8;
int Ii_005F8;
double Id_00600;
int Ii_00608;
int Ii_00620;
double Id_00628;
int Ii_00630;
double Id_00640;
bool Ib_00648;
bool Ib_00668;
int Ii_006B0;
int Ii_006E8;
double Id_006F0;
int Ii_006F8;
int Ii_00718;
double Id_00720;
int Ii_00728;
double Id_00738;
long Il_00808;
long Il_00810;
long Il_00818;
string Is_00820;
string Is_00830;
bool Ib_008F8;
int Ii_008FC;
int Ii_00900;
int Ii_00904;
int Ii_00908;
int Ii_0090C;
int Ii_00910;
bool Ib_00914;
int Ii_00918;
int Ii_0091C;
int Ii_00920;
int Ii_00924;
int Ii_00928;
int Ii_0092C;
int Ii_00930;
bool Ib_00934;
bool Ib_00935;
double Id_00938;
int Ii_00940;
int Ii_00944;
int Ii_00948;
bool Ib_0094C;
double Id_00950;
bool Ib_00958;
double Id_00960;
bool Ib_00968;
double Id_00970;
int Ii_00978;
double Id_00980;
int Ii_00988;
int Ii_0098C;
bool Ib_00990;
int Ii_00994;
double Id_00998;
int Ii_009A0;
double Id_009A8;
bool Ib_009B0;
int Ii_009B4;
int Ii_009B8;
int Ii_009BC;
int Ii_009C0;
int Ii_009C4;
bool Ib_009C8;
double Id_009D0;
double Id_009D8;
double Id_009E0;
bool Ib_009E8;
double Id_009F0;
double Id_009F8;
double Id_00A00;
int Ii_00A08;
int Ii_00A0C;
bool Ib_00A10;
double Id_00A18;
int Ii_00A20;
int Ii_00A24;
bool Ib_00A28;
int Ii_00A2C;
int Ii_00A30;
double Id_00A38;
double Id_00A40;
bool Ib_00A48;
int Ii_00A4C;
bool Ib_00A50;
double Id_00A58;
double Id_00A60;
double Id_00A68;
bool Ib_00A70;
double Id_00A78;
int Ii_00A80;
double Id_00A88;
int Ii_00A90;
int Ii_00A94;
int Ii_00A98;
int Ii_00A9C;
int Ii_00AA0;
int Ii_00AA4;
double Id_00AA8;
double Id_00AB0;
double Id_00AB8;
bool Ib_00AC0;
double Id_00AC8;
double Id_00AD0;
bool Ib_00AD8;
double Id_00AE0;
double Id_00AE8;
double Id_00AF0;
double Id_00AF8;
double Id_00B00;
double Id_00B08;
double Id_00B10;
double Id_00B18;
double Id_00B20;
double Id_00B28;
double Id_00B30;
double Id_00B38;
double Id_00B40;
double Id_00B48;
bool Ib_00B50;
bool Ib_00B51;
double Id_00B58;
double Id_00B60;
double Id_00B68;
double Id_00B70;
string Is_00B78;
double Id_00B88;
string Is_00B90;
string Is_00BA0;
string Is_00BB0;
string Is_00BC0;
string Is_00BD0;
string Is_00BE0;
string Is_00BF0;
string Is_00C00;
string Is_00C10;
string Is_00C20;
string Is_00C30;
string Is_00C40;
string Is_00C50;
string Is_00C60;
string Is_00C70;
string Is_00C80;
string Is_00C90;
long Il_00CA0;
string Is_00CA8;
double Id_00CB8;
long Il_00CC0;
bool Ib_00CC8;
long Il_00CD0;
long Il_00CD8;
long Il_00CE0;
bool Ib_00CE8;
bool Ib_00CE9;
char Ic_00CEA;
char Ic_00CEB;
char Ic_00CEC;
char Ic_00CED;
char Ic_00CEE;
long Il_00CF0;
long Il_00CF8;
short Ist_00D00;
short Ist_00D02;
string Is_00D08;
string Is_00D18;
bool Ib_00D24;
bool Ib_00D25;
long Il_00D28;
bool Ib_00D30;
long Il_00D38;
string Is_00D40;
string Is_00D50;
long Il_00D60;
long Il_00D68;
long Il_00D70;
char Ic_00D78;
char Ic_00D79;
char Ic_00D7A;
char Ic_00D7B;
char Ic_00D7C;
char Ic_00D7D;
char Ic_00D7E;
char Ic_00D7F;
char Ic_00D80;
char Ic_00D81;
char Ic_00D82;
char Ic_00D83;
char Ic_00D84;
char Ic_00D85;
char Ic_00D86;
char Ic_00D87;
char Ic_00D88;
char Ic_00D89;
char Ic_00D8A;
char Ic_00D8B;
char Ic_00D8C;
char Ic_00D8D;
char Ic_0108C;
string Is_010A8;
double Gd_00000;
short returned_st;
short Gst_00000;
string Gs_00001;
string Gs_00002;
string Gs_00003;
double Gd_00004;
double Gd_00005;
int Gi_00004;
string Gs_00004;
bool Gb_00000;
bool Gb_00002;
double Gd_00002;
bool Gb_00004;
double Ind_002;
int Gi_00005;
string Gs_00005;
int Gi_00006;
string Gs_00006;
int Gi_00007;
string Gs_00007;
int Gi_00008;
string Gs_00008;
int Gi_00009;
string Gs_00009;
int Gi_0000A;
string Gs_0000A;
double Gd_0000B;
int Gi_0000B;
string Gs_0000B;
int Gi_0000C;
string Gs_0000C;
int Gi_0000D;
string Gs_0000D;
int Gi_0000E;
string Gs_0000E;
int Gi_0000F;
string Gs_0000F;
int Gi_00010;
string Gs_00010;
int Gi_00011;
string Gs_00011;
long Gl_00012;
int Gi_00012;
string Gs_00012;
double Ind_003;
string Is_0003C[];
int Ii_00DC4[100];
string Is_00F54[];
double Id_00F88[];
double Id_00FBC[];
double Id_00FF0[];
double Id_01024[];
long Il_01058[];
double returned_double;
int init()
{
// код доступен только после оплаты
}
void OnTick()
{
// код доступен только после оплаты
}
string tmp_str00000;
string tmp_str00001;
string tmp_str00002;
string tmp_str00003;
string tmp_str00004;
string tmp_str00005;
string tmp_str00006;
string tmp_str00007;
string tmp_str00008;
string tmp_str00009;
string tmp_str0000A;
string tmp_str0000B;
string tmp_str0000C;
string tmp_str0000D;
string tmp_str0000E;
string tmp_str0000F;
string tmp_str00010;
string tmp_str00011;
string tmp_str00012;
string tmp_str00013;
string tmp_str00014;
string tmp_str00015;
string tmp_str00016;
string tmp_str00017;
string Ls_FFFF0;
string Ls_FFFE0;
string Ls_FFFD0;
string Ls_FFFC0;
string Ls_FFFB0;
string Ls_FFFA0;
string Ls_FFF90;
string Ls_FFF80;
string Ls_FFF70;
string Ls_FFF60;
string Ls_FFF50;
string Ls_FFF40;
string Ls_FFF30;
string Ls_FFF20;
string Ls_FFF10;
string Ls_FFF00;
string Ls_FFEF0;
string Ls_FFEE0;
string Ls_FFED0;
string Ls_FFEC0;
string Ls_FFEB0;
string Ls_FFEA0;
string Ls_FFE90;
string Ls_FFE80;
string Ls_FFE70;
string Ls_FFE60;
string Ls_FFE50;
string Ls_FFE40;
string Ls_FFE30;
string Ls_FFE20;
string Ls_FFE10;
string Ls_FFE00;
string Ls_FFDF0;
string Ls_FFDE0;
string Ls_FFDD0;
string Ls_FFDC0;
string Ls_FFDB0;
string Ls_FFDA0;
string Ls_FFD90;
string Ls_FFD80;
string Ls_FFD70;
string Ls_FFD60;
string Ls_FFD50;
string Ls_FFD40;
string Ls_FFD30;
string Ls_FFD20;
string Ls_FFD10;
string Ls_FFD00;
string Ls_FFCF0;
string Ls_FFCE0;
string Ls_FFCD0;
string Ls_FFCC0;
string Ls_FFCB0;
string Ls_FFCA0;
string Ls_FFC90;
string Ls_FFC80;
string Ls_FFC70;
string Ls_FFC60;
string Ls_FFC50;
string Ls_FFC40;
string Ls_FFC30;
string Ls_FFC20;
string Ls_FFC10;
string Ls_FFC00;
string Ls_FFBF0;
string Ls_FFBE0;
string Ls_FFBD0;
string Ls_FFBC0;
string Ls_FFBB0;
string Ls_FFBA0;
string Ls_FFB90;
string Ls_FFB80;
string Ls_FFB70;
string Ls_FFB60;
string Ls_FFB50;
string Ls_FFB40;
string Ls_FFB30;
string Ls_FFB20;
string Ls_FFB10;
string Ls_FFB00;
string Ls_FFAF0;
string Ls_FFAE0;
string Ls_FFAD0;
string Ls_FFAC0;
string Ls_FFAB0;
string Ls_FFAA0;
string Ls_FFA90;
string Ls_FFA80;
string Ls_FFA70;
string Ls_FFA60;
string Ls_FFA50;
string Ls_FFA40;
string Ls_FFA30;
string Ls_FFA20;
string Ls_FFA10;
string Ls_FFA00;
string Ls_FF9F0;
string Ls_FF9E0;
string Ls_FF9D0;
string Ls_FF9C0;
double Ld_FF9B8;
double Ld_FF9B0;
bool Lb_FF9AF;
bool Lb_FF9AE;
double Ld_FF9A0;
double Ld_FF998;
double Ld_FF990;
int Li_FF98C;
double Ld_FF980;
int Li_FF97C;
double Ld_FF970;
int Li_FF96C;
double Ld_FF960;
int Li_FF95C;
Ld_FF9B8 = 0;
Ld_FF9B0 = 0;
Lb_FF9AF = false;
Lb_FF9AE = false;
Ld_FF9A0 = 0;
Ld_FF998 = 0;
Ld_FF990 = 0;
Li_FF98C = 0;
Ld_FF980 = 0;
Li_FF97C = 0;
Ld_FF970 = 0;
Li_FF96C = 0;
Ld_FF960 = 0;
Li_FF95C = 0;
if (Is_00230 == "MINI" || Is_00230 == "MAX") {
Ib_0023C = true;
}
Ls_FFFB0 = "\n";
Ls_FFFA0 = "Arial";
Ii_001A0 = 20;
Ii_001A4 = 5;
Ii_001B0 = 32896;
Ls_FFF90 = "Activated: " + Is_00240;
Ls_FFF80 = Is_00180 + "Warning_Work_1";
if (ObjectFind(0, Ls_FFF80) < 0) {
ObjectCreate(0, Ls_FFF80, OBJ_LABEL, 0, 0, 0);
ObjectSetInteger(0, Ls_FFF80, 101, 3);
ObjectSetInteger(0, Ls_FFF80, 1011, 4);
ObjectSetString(0, Ls_FFF80, 1001, Ls_FFFA0);
ObjectSetInteger(0, Ls_FFF80, 100, 10);
ObjectSetInteger(0, Ls_FFF80, 1000, 0);
ObjectSetInteger(0, Ls_FFF80, 17, 0);
ObjectSetString(0, Ls_FFF80, 206, Ls_FFFB0);
ObjectSetInteger(0, Ls_FFF80, 9, 0);
ObjectSetInteger(0, Ls_FFF80, 208, 0);
}
ObjectSetInteger(0, Ls_FFF80, 102, Ii_001A4);
ObjectSetInteger(0, Ls_FFF80, 103, Ii_001A0);
ObjectSetString(0, Ls_FFF80, 999, Ls_FFF90);
ObjectSetInteger(0, Ls_FFF80, 6, Ii_001B0);
ChartRedraw(0);
func_1031();
if (UseTrailingStop) {
Ib_00258 = (TrailingStopStart > 0);
if (Ib_00258) {
func_1032();
}}
Ld_FF9B8 = 0;
Ld_FF9B0 = 0;
func_1033(Ld_FF9B8, Ld_FF9B0);
Ib_00258 = false;
Ii_001C0 = 0;
Ls_FFF70 = _Symbol;
Il_00260 = SeriesInfoInteger(Ls_FFF70, TimeFrame, 5);
if (ArrayRange(Il_01058, 0) < 1) {
ArrayResize(Il_01058, 1, 0);
Il_01058[0] = Il_00260;
Ib_00270 = Ib_00258;
}
else {
if (Il_01058[Ii_001C0] == Il_00260) {
Ib_00270 = false;
}
else {
Il_01058[Ii_001C0] = Il_00260;
Ib_00270 = true;
}}
Lb_FF9AF = Ib_00270;
Ib_00200 = IsTesting();
if (Ib_00200 != true) {
Ib_00200 = IsExpertEnabled();
if (Ib_00200) {
Ib_00200 = IsTradeAllowed();
}}
Lb_FF9AE = Ib_00200;
Ib_00271 = Ib_00200;
if (Ib_00200) {
returned_double = NormalizeDouble((MarketInfo(_Symbol, MODE_SPREAD) / Ii_001E4), 1);
Id_010A0 = returned_double;
Ib_00200 = (MaxSpread <= Id_010A0);
if (Ib_00200) {
if (Ib_00272) {
Ls_FFF60 = StringConcatenate("Spread (", returned_double, ")", " > ", "Max Spread (", MaxSpread, ")");
Print(Ls_FFF60);
if (SpreadAlert) {
Alert(Ls_FFF60);
}
Ib_00272 = false;
}
Ib_00200 = false;
}
else {
Ib_00272 = true;
Ib_00200 = true;
}
Ib_00271 = Ib_00200;
}
if (Ib_00271) {
if (EnableTimer != true) {
Ib_00273 = true;
}
else {
if (EnableTimer != 0 && TimeCurrent() > StringToTime(TimerStart) && TimeCurrent() < StringToTime(TimerEnd)) {
Ib_00273 = true;
}
else{
Ib_00273 = false;
}}
Ib_00271 = Ib_00273;
}
Lb_FF9AE = Ib_00271;
Ib_00274 = Ib_00271;
if (Ib_00271) {
Ib_00274 = Lb_FF9AF;
}
Lb_FF9AE = Ib_00274;
HideTestIndicators(true);
HideTestIndicators(true);
Id_00280 = iMA(NULL, TimeFrame, MA1Period, 0, 0, 0, Ii_00278);
Id_00288 = iMA(NULL, TimeFrame, MA2Period, 0, 0, 0, Ii_00278);
if (AvoidNews != true) {
Ib_00290 = false;
}
else {
if ((iCustom(_Symbol, 0, "urdala_news_investing.com", UTimeDo, UTimePosle, Uoffset, Vhigh, Vmedium, Vlow, 0, 0) != 0)) {
Ib_00290 = true;
}
else {
Ib_00290 = false;
}}
Ib_00291 = !Ib_00290;
if (Ib_00290 != true) {
Id_00298 = (Id_00280 - Ask);
Ib_00291 = (Id_00298 > (Delta1 * _Point));
}
if (Ib_00291) {
Id_00298 = (Id_00288 - Ask);
Ib_00291 = (Id_00298 > (Delta2 * _Point));
}
if (Ib_00291) {
Ib_00291 = (Id_00280 < Id_00288);
}
Ib_002B1 = Ib_00291;
if (AvoidNews != true) {
Ib_002A1 = false;
}
else {
if ((iCustom(_Symbol, 0, "urdala_news_investing.com", UTimeDo, UTimePosle, Uoffset, Vhigh, Vmedium, Vlow, 0, 0) != 0)) {
Ib_002A1 = true;
}
else {
Ib_002A1 = false;
}}
Ib_002A2 = !Ib_002A1;
if (Ib_002A1 != true) {
Id_002A8 = (Bid - Id_00280);
Ib_002A2 = (Id_002A8 > (Delta1 * _Point));
}
if (Ib_002A2) {
Id_002A8 = (Bid - Id_00288);
Ib_002A2 = (Id_002A8 > (Delta2 * _Point));
}
if (Ib_002A2) {
Ib_002A2 = (Id_00280 > Id_00288);
}
Ib_002B3 = Ib_002A2;
HideTestIndicators(false);
Ib_002B0 = Ib_002B1;
if (Ib_002B1) {
Ib_002B0 = Ib_002B2;
}
if (Ib_002B0) {
Ib_002B0 = Lb_FF9AE;
}
Ib_002B1 = Ib_002B0;
Ib_002B0 = Ib_002B3;
if (Ib_002B3) {
Ib_002B0 = Ib_002B4;
}
if (Ib_002B0) {
Ib_002B0 = Lb_FF9AE;
}
Ib_002B3 = Ib_002B0;
Ls_FFF50 = "price";
Ii_002B8 = 0;
Id_002C0 = 0;
Id_002C8 = 0;
Id_002D0 = 0;
Ii_002D8 = 0;
Ii_002DC = 0;
Ii_002E0 = 0;
Ii_002E4 = OrdersTotal() - 1;
Ii_002E8 = Ii_002E4;
if (Ii_002E4 >= 0) {
do {
if (OrderSelect(Ii_002E8, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() == Ii_002B8 || Ii_002B8 < 0) {
Ii_002DC = OrderTicket();
if (Ii_002D8 < Ii_002DC) {
Ii_002D8 = Ii_002DC;
Id_002C0 = OrderOpenPrice();
Ii_002E0 = OrderTicket();
Id_002C8 = OrderLots();
Id_002F0 = OrderProfit();
Id_002F0 = (Id_002F0 + OrderSwap());
Id_002D0 = (Id_002F0 + OrderCommission());
}}}}
Ii_002E8 = Ii_002E8 - 1;
} while (Ii_002E8 >= 0);
}
Id_002F0 = 0;
if (Ls_FFF50 == "price") {
Id_002F0 = Id_002C0;
}
else {
if (Ls_FFF50 == "ticket") {
Id_002F0 = Ii_002E0;
}
else {
if (Ls_FFF50 == "lot") {
Id_002F0 = Id_002C8;
}
else {
if (Ls_FFF50 == "profit") {
Id_002F0 = Id_002D0;
}}}}
Ld_FF9A0 = Id_002F0;
Ls_FFF40 = "price";
Ii_002F8 = 1;
Id_00300 = 0;
Id_00308 = 0;
Id_00310 = 0;
Ii_00318 = 0;
Ii_0031C = 0;
Ii_00320 = 0;
Ii_00324 = OrdersTotal() - 1;
Ii_00328 = Ii_00324;
if (Ii_00324 >= 0) {
do {
if (OrderSelect(Ii_00328, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() == Ii_002F8 || Ii_002F8 < 0) {
Ii_0031C = OrderTicket();
if (Ii_00318 < Ii_0031C) {
Ii_00318 = Ii_0031C;
Id_00300 = OrderOpenPrice();
Ii_00320 = OrderTicket();
Id_00308 = OrderLots();
Id_00330 = OrderProfit();
Id_00330 = (Id_00330 + OrderSwap());
Id_00310 = (Id_00330 + OrderCommission());
}}}}
Ii_00328 = Ii_00328 - 1;
} while (Ii_00328 >= 0);
}
Id_00330 = 0;
if (Ls_FFF40 == "price") {
Id_00330 = Id_00300;
}
else {
if (Ls_FFF40 == "ticket") {
Id_00330 = Ii_00320;
}
else {
if (Ls_FFF40 == "lot") {
Id_00330 = Id_00308;
}
else {
if (Ls_FFF40 == "profit") {
Id_00330 = Id_00310;
}}}}
Ld_FF998 = Id_00330;
if (Ib_002B1) {
Ii_00338 = 0;
Ii_0033C = 0;
Ii_00340 = OrdersTotal() - 1;
Ii_00344 = Ii_00340;
if (Ii_00340 >= 0) {
do {
if (OrderSelect(Ii_00344, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_00338 < 0) {
Ii_0033C = Ii_0033C + 1;
}
else {
if (OrderType() == Ii_00338) {
Ii_0033C = Ii_0033C + 1;
}}}}
Ii_00344 = Ii_00344 - 1;
} while (Ii_00344 >= 0);
}
Ii_00340 = 0;
Ii_00348 = 0;
Ii_0034C = OrdersTotal() - 1;
Ii_00350 = Ii_0034C;
if (Ii_0034C >= 0) {
do {
if (OrderSelect(Ii_00350, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_00340 < 0) {
Ii_00348 = Ii_00348 + 1;
}
else {
if (OrderType() == Ii_00340) {
Ii_00348 = Ii_00348 + 1;
}}}}
Ii_00350 = Ii_00350 - 1;
} while (Ii_00350 >= 0);
}
Ii_0034C = Ii_00348;
Ii_00354 = 1;
Ii_00358 = 0;
Ii_0035C = OrdersTotal() - 1;
Ii_00360 = Ii_0035C;
if (Ii_0035C >= 0) {
do {
if (OrderSelect(Ii_00360, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_00354 < 0) {
Ii_00358 = Ii_00358 + 1;
}
else {
if (OrderType() == Ii_00354) {
Ii_00358 = Ii_00358 + 1;
}}}}
Ii_00360 = Ii_00360 - 1;
} while (Ii_00360 >= 0);
}
Ii_0035C = Ii_0034C + Ii_00358;
if ((!UseGrid && MaxOpenOrders > Ii_0033C)
|| (UseGrid && Ii_0035C < 1)) {
Ld_FF990 = Ld_FF9B8;
Li_FF98C = -1;
Ls_FFF30 = NULL;
Ib_00364 = true;
if (Ls_FFF30 == NULL) {
Ls_FFF30 = _Symbol;
}
Ii_00368 = OrdersTotal() - 1;
Ii_0036C = Ii_00368;
if (Ii_00368 >= 0) {
do {
if (OrderSelect(Ii_0036C, 0, 0) && OrderSymbol() == Ls_FFF30) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
Il_00370 = iTime(Ls_FFF30, 0, 0);
if (Il_00370 <= OrderOpenTime()) {
Ib_00364 = false;
break;
}}}
Ii_0036C = Ii_0036C - 1;
} while (Ii_0036C >= 0);
}
if (Ib_00364) {
Ls_FFF20 = NULL;
Ib_00378 = true;
if (Ls_FFF20 == NULL) {
Ls_FFF20 = _Symbol;
}
Ii_0037C = HistoryTotal() - 1;
Ii_00380 = Ii_0037C;
if (Ii_0037C >= 0) {
do {
if (OrderSelect(Ii_00380, 0, 1) && OrderSymbol() == Ls_FFF20) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() <= OP_SELL) {
Il_00388 = iTime(Ls_FFF20, 0, 0);
if (Il_00388 <= OrderOpenTime()) {
Ib_00378 = false;
break;
}}}}
Ii_00380 = Ii_00380 - 1;
} while (Ii_00380 >= 0);
}
if (Ib_00378) {
if (CompareDoubles(0, StopLoss)) {
Id_00390 = 0;
}
else {
Id_003A0 = (StopLoss * Id_001F8);
Id_00390 = (Bid - Id_003A0);
}
Id_00398 = Id_00390;
if (CompareDoubles(0, TakeProfit)) {
Id_003A0 = 0;
}
else {
Id_003A0 = ((TakeProfit * Id_001F8) + Ask);
}
Id_003A8 = Id_003A0;
Ls_FFF10 = EAComment;
Ls_FFF00 = _Symbol;
tmp_str00000 = EAComment;
tmp_str00001 = _Symbol;
Li_FF98C = func_1030(tmp_str00001, 0, Ld_FF990, Ask, (Slippage * Ii_001E4), Id_00398, Id_003A0, tmp_str00000, MagicNumber, 0, 16711680);
}}
if (Ib_003B4 && Li_FF98C > 0) {
Ls_FFEF0 = _Symbol;
Ib_003B5 = true;
if (Ls_FFEF0 == NULL) {
Ls_FFEF0 = _Symbol;
}
Ii_003B8 = OrdersTotal() - 1;
Ii_003BC = Ii_003B8;
if (Ii_003B8 >= 0) {
do {
if (OrderSelect(Ii_003BC, 0, 0) && OrderSymbol() == Ls_FFEF0) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
Il_003C0 = iTime(Ls_FFEF0, 0, 0);
if (Il_003C0 <= OrderOpenTime()) {
Ib_003B5 = false;
break;
}}}
Ii_003BC = Ii_003BC - 1;
} while (Ii_003BC >= 0);
}
if (Ib_003B5) {
Ls_FFEE0 = _Symbol;
Ib_003C8 = true;
if (Ls_FFEE0 == NULL) {
Ls_FFEE0 = _Symbol;
}
Ii_003CC = HistoryTotal() - 1;
Ii_003D0 = Ii_003CC;
if (Ii_003CC >= 0) {
do {
if (OrderSelect(Ii_003D0, 0, 1) && OrderSymbol() == Ls_FFEE0) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() <= OP_SELL) {
Il_003D8 = iTime(Ls_FFEE0, 0, 0);
if (Il_003D8 <= OrderOpenTime()) {
Ib_003C8 = false;
break;
}}}}
Ii_003D0 = Ii_003D0 - 1;
} while (Ii_003D0 >= 0);
}
if (Ib_003C8) {
if (Ii_003E0 == 0) {
if (CompareDoubles(0, StopLoss)) {
Id_003E8 = 0;
}
else {
Ls_FFED0 = Is_00410;
Ls_FFEC0 = "bid";
if (Ls_FFED0 == NULL) {
Ls_FFED0 = _Symbol;
}
if (Ls_FFEC0 == "ask") {
Id_00800 = MarketInfo(Ls_FFED0, MODE_ASK);
}
else {
if (Ls_FFEC0 == "bid") {
Id_00800 = MarketInfo(Ls_FFED0, MODE_BID);
}
else {
if (Ls_FFEC0 == "point") {
Id_00800 = MarketInfo(Ls_FFED0, MODE_POINT);
}
else {
if (Ls_FFEC0 == "digits") {
Id_00800 = MarketInfo(Ls_FFED0, MODE_DIGITS);
}
else {
Id_00800 = 0;
}}}}
Id_003F0 = (StopLoss * Id_001F8);
Id_003E8 = (Id_00800 - Id_003F0);
}
Id_00398 = Id_003E8;
if (CompareDoubles(0, TakeProfit)) {
Id_003F0 = 0;
}
else {
Ls_FFEB0 = Is_00410;
Ls_FFEA0 = "ask";
if (Ls_FFEB0 == NULL) {
Ls_FFEB0 = _Symbol;
}
if (Ls_FFEA0 == "ask") {
Id_007F8 = MarketInfo(Ls_FFEB0, MODE_ASK);
}
else {
if (Ls_FFEA0 == "bid") {
Id_007F8 = MarketInfo(Ls_FFEB0, MODE_BID);
}
else {
if (Ls_FFEA0 == "point") {
Id_007F8 = MarketInfo(Ls_FFEB0, MODE_POINT);
}
else {
if (Ls_FFEA0 == "digits") {
Id_007F8 = MarketInfo(Ls_FFEB0, MODE_DIGITS);
}
else {
Id_007F8 = 0;
}}}}
Id_003F0 = ((TakeProfit * Id_001F8) + Id_007F8);
}
Id_003A8 = Id_003F0;
Ls_FFE90 = EAComment;
Ls_FFE80 = Is_00410;
Ls_FFE70 = "ask";
if (Ls_FFE80 == NULL) {
Ls_FFE80 = _Symbol;
}
if (Ls_FFE70 == "ask") {
Id_00420 = MarketInfo(Ls_FFE80, MODE_ASK);
}
else {
if (Ls_FFE70 == "bid") {
Id_00420 = MarketInfo(Ls_FFE80, MODE_BID);
}
else {
if (Ls_FFE70 == "point") {
Id_00420 = MarketInfo(Ls_FFE80, MODE_POINT);
}
else {
if (Ls_FFE70 == "digits") {
Id_00420 = MarketInfo(Ls_FFE80, MODE_DIGITS);
}
else {
Id_00420 = 0;
}}}}
Ls_FFE60 = _Symbol;
tmp_str00002 = Ls_FFE90;
tmp_str00003 = _Symbol;
Li_FF98C = func_1030(tmp_str00003, 0, ((Ld_FF990 * Id_00428) / 100), Id_00420, Slippage, Id_00398, Id_003F0, tmp_str00002, MagicNumber, 0, 16711680);
}
if (Ii_003E0 == 1) {
if (CompareDoubles(0, StopLoss)) {
Id_00430 = 0;
}
else {
Ls_FFE50 = _Symbol;
Ls_FFE40 = "ask";
if (Ls_FFE50 == NULL) {
Ls_FFE50 = _Symbol;
}
if (Ls_FFE40 == "ask") {
Id_007F0 = MarketInfo(Ls_FFE50, MODE_ASK);
}
else {
if (Ls_FFE40 == "bid") {
Id_007F0 = MarketInfo(Ls_FFE50, MODE_BID);
}
else {
if (Ls_FFE40 == "point") {
Id_007F0 = MarketInfo(Ls_FFE50, MODE_POINT);
}
else {
if (Ls_FFE40 == "digits") {
Id_007F0 = MarketInfo(Ls_FFE50, MODE_DIGITS);
}
else {
Id_007F0 = 0;
}}}}
Id_00430 = ((StopLoss * Id_001F8) + Id_007F0);
}
Id_00398 = Id_00430;
if (CompareDoubles(0, TakeProfit)) {
Id_00430 = 0;
}
else {
Ls_FFE30 = _Symbol;
Ls_FFE20 = "bid";
if (Ls_FFE30 == NULL) {
Ls_FFE30 = _Symbol;
}
if (Ls_FFE20 == "ask") {
Id_007E0 = MarketInfo(Ls_FFE30, MODE_ASK);
}
else {
if (Ls_FFE20 == "bid") {
Id_007E0 = MarketInfo(Ls_FFE30, MODE_BID);
}
else {
if (Ls_FFE20 == "point") {
Id_007E0 = MarketInfo(Ls_FFE30, MODE_POINT);
}
else {
if (Ls_FFE20 == "digits") {
Id_007E0 = MarketInfo(Ls_FFE30, MODE_DIGITS);
}
else {
Id_007E0 = 0;
}}}}
Id_007E8 = (TakeProfit * Id_001F8);
Id_00430 = (Id_007E0 - Id_007E8);
}
Id_003A8 = Id_00430;
Ls_FFE10 = EAComment;
Ls_FFE00 = Is_00410;
Ls_FFDF0 = "bid";
if (Ls_FFE00 == NULL) {
Ls_FFE00 = _Symbol;
}
if (Ls_FFDF0 == "ask") {
Id_00450 = MarketInfo(Ls_FFE00, MODE_ASK);
}
else {
if (Ls_FFDF0 == "bid") {
Id_00450 = MarketInfo(Ls_FFE00, MODE_BID);
}
else {
if (Ls_FFDF0 == "point") {
Id_00450 = MarketInfo(Ls_FFE00, MODE_POINT);
}
else {
if (Ls_FFDF0 == "digits") {
Id_00450 = MarketInfo(Ls_FFE00, MODE_DIGITS);
}
else {
Id_00450 = 0;
}}}}
Ls_FFDE0 = _Symbol;
tmp_str00004 = Ls_FFE10;
tmp_str00005 = _Symbol;
Li_FF98C = func_1030(tmp_str00005, 1, ((Ld_FF990 * Id_00428) / 100), Id_00450, Slippage, Id_00398, Id_00430, tmp_str00004, MagicNumber, 0, 255);
}}}}}}
if (Ib_002B3) {
Ii_00460 = 1;
Ii_00464 = 0;
Ii_00468 = OrdersTotal() - 1;
Ii_0046C = Ii_00468;
if (Ii_00468 >= 0) {
do {
if (OrderSelect(Ii_0046C, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_00460 < 0) {
Ii_00464 = Ii_00464 + 1;
}
else {
if (OrderType() == Ii_00460) {
Ii_00464 = Ii_00464 + 1;
}}}}
Ii_0046C = Ii_0046C - 1;
} while (Ii_0046C >= 0);
}
Ii_00468 = 0;
Ii_00470 = 0;
Ii_00474 = OrdersTotal() - 1;
Ii_00478 = Ii_00474;
if (Ii_00474 >= 0) {
do {
if (OrderSelect(Ii_00478, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_00468 < 0) {
Ii_00470 = Ii_00470 + 1;
}
else {
if (OrderType() == Ii_00468) {
Ii_00470 = Ii_00470 + 1;
}}}}
Ii_00478 = Ii_00478 - 1;
} while (Ii_00478 >= 0);
}
Ii_00474 = Ii_00470;
Ii_0047C = 1;
Ii_00480 = 0;
Ii_00484 = OrdersTotal() - 1;
Ii_00488 = Ii_00484;
if (Ii_00484 >= 0) {
do {
if (OrderSelect(Ii_00488, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_0047C < 0) {
Ii_00480 = Ii_00480 + 1;
}
else {
if (OrderType() == Ii_0047C) {
Ii_00480 = Ii_00480 + 1;
}}}}
Ii_00488 = Ii_00488 - 1;
} while (Ii_00488 >= 0);
}
Ii_00484 = Ii_00474 + Ii_00480;
if ((!UseGrid && MaxOpenOrders > Ii_00464)
|| (UseGrid && Ii_00484 < 1)) {
Ld_FF980 = Ld_FF9B0;
Li_FF97C = -1;
Ls_FFDD0 = NULL;
Ib_0048C = true;
if (Ls_FFDD0 == NULL) {
Ls_FFDD0 = _Symbol;
}
Ii_00490 = OrdersTotal() - 1;
Ii_00494 = Ii_00490;
if (Ii_00490 >= 0) {
do {
if (OrderSelect(Ii_00494, 0, 0) && OrderSymbol() == Ls_FFDD0) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
Il_00498 = iTime(Ls_FFDD0, 0, 0);
if (Il_00498 <= OrderOpenTime()) {
Ib_0048C = false;
break;
}}}
Ii_00494 = Ii_00494 - 1;
} while (Ii_00494 >= 0);
}
if (Ib_0048C) {
Ls_FFDC0 = NULL;
Ib_004A0 = true;
if (Ls_FFDC0 == NULL) {
Ls_FFDC0 = _Symbol;
}
Ii_004A4 = HistoryTotal() - 1;
Ii_004A8 = Ii_004A4;
if (Ii_004A4 >= 0) {
do {
if (OrderSelect(Ii_004A8, 0, 1) && OrderSymbol() == Ls_FFDC0) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() <= OP_SELL) {
Il_004B0 = iTime(Ls_FFDC0, 0, 0);
if (Il_004B0 <= OrderOpenTime()) {
Ib_004A0 = false;
break;
}}}}
Ii_004A8 = Ii_004A8 - 1;
} while (Ii_004A8 >= 0);
}
if (Ib_004A0) {
if (CompareDoubles(0, StopLoss)) {
Id_004B8 = 0;
}
else {
Id_004B8 = ((StopLoss * Id_001F8) + Ask);
}
Id_00398 = Id_004B8;
if (CompareDoubles(0, TakeProfit)) {
Id_004B8 = 0;
}
else {
Id_007D8 = (TakeProfit * Id_001F8);
Id_004B8 = (Bid - Id_007D8);
}
Id_003A8 = Id_004B8;
Ls_FFDB0 = EAComment;
Ls_FFDA0 = _Symbol;
tmp_str00006 = EAComment;
tmp_str00007 = _Symbol;
Li_FF97C = func_1030(tmp_str00007, 1, Ld_FF980, Bid, (Slippage * Ii_001E4), Id_00398, Id_004B8, tmp_str00006, MagicNumber, 0, 255);
}}
if (Ib_003B4 && Li_FF97C > 0) {
Ls_FFD90 = _Symbol;
Ib_004C4 = true;
if (Ls_FFD90 == NULL) {
Ls_FFD90 = _Symbol;
}
Ii_004C8 = OrdersTotal() - 1;
Ii_004CC = Ii_004C8;
if (Ii_004C8 >= 0) {
do {
if (OrderSelect(Ii_004CC, 0, 0) && OrderSymbol() == Ls_FFD90) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
Il_004D0 = iTime(Ls_FFD90, 0, 0);
if (Il_004D0 <= OrderOpenTime()) {
Ib_004C4 = false;
break;
}}}
Ii_004CC = Ii_004CC - 1;
} while (Ii_004CC >= 0);
}
if (Ib_004C4) {
Ls_FFD80 = Is_00410;
Ib_004D8 = true;
if (Ls_FFD80 == NULL) {
Ls_FFD80 = _Symbol;
}
Ii_004DC = HistoryTotal() - 1;
Ii_004E0 = Ii_004DC;
if (Ii_004DC >= 0) {
do {
if (OrderSelect(Ii_004E0, 0, 1) && OrderSymbol() == Ls_FFD80) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() <= OP_SELL) {
Il_004E8 = iTime(Ls_FFD80, 0, 0);
if (Il_004E8 <= OrderOpenTime()) {
Ib_004D8 = false;
break;
}}}}
Ii_004E0 = Ii_004E0 - 1;
} while (Ii_004E0 >= 0);
}
if (Ib_004D8) {
if (Ii_003E0 == 0) {
if (CompareDoubles(0, StopLoss)) {
Id_004F0 = 0;
}
else {
Ls_FFD70 = Is_00410;
Ls_FFD60 = "ask";
if (Ls_FFD70 == NULL) {
Ls_FFD70 = _Symbol;
}
if (Ls_FFD60 == "ask") {
Id_007D0 = MarketInfo(Ls_FFD70, MODE_ASK);
}
else {
if (Ls_FFD60 == "bid") {
Id_007D0 = MarketInfo(Ls_FFD70, MODE_BID);
}
else {
if (Ls_FFD60 == "point") {
Id_007D0 = MarketInfo(Ls_FFD70, MODE_POINT);
}
else {
if (Ls_FFD60 == "digits") {
Id_007D0 = MarketInfo(Ls_FFD70, MODE_DIGITS);
}
else {
Id_007D0 = 0;
}}}}
Id_004F0 = ((StopLoss * Id_001F8) + Id_007D0);
}
Id_00398 = Id_004F0;
if (CompareDoubles(0, TakeProfit)) {
Id_004F0 = 0;
}
else {
Ls_FFD50 = Is_00410;
Ls_FFD40 = "bid";
if (Ls_FFD50 == NULL) {
Ls_FFD50 = _Symbol;
}
if (Ls_FFD40 == "ask") {
Id_007C0 = MarketInfo(Ls_FFD50, MODE_ASK);
}
else {
if (Ls_FFD40 == "bid") {
Id_007C0 = MarketInfo(Ls_FFD50, MODE_BID);
}
else {
if (Ls_FFD40 == "point") {
Id_007C0 = MarketInfo(Ls_FFD50, MODE_POINT);
}
else {
if (Ls_FFD40 == "digits") {
Id_007C0 = MarketInfo(Ls_FFD50, MODE_DIGITS);
}
else {
Id_007C0 = 0;
}}}}
Id_007C8 = (TakeProfit * Id_001F8);
Id_004F0 = (Id_007C0 - Id_007C8);
}
Id_003A8 = Id_004F0;
Ls_FFD30 = EAComment;
Ls_FFD20 = Is_00410;
Ls_FFD10 = "bid";
if (Ls_FFD20 == NULL) {
Ls_FFD20 = _Symbol;
}
if (Ls_FFD10 == "ask") {
Id_00510 = MarketInfo(Ls_FFD20, MODE_ASK);
}
else {
if (Ls_FFD10 == "bid") {
Id_00510 = MarketInfo(Ls_FFD20, MODE_BID);
}
else {
if (Ls_FFD10 == "point") {
Id_00510 = MarketInfo(Ls_FFD20, MODE_POINT);
}
else {
if (Ls_FFD10 == "digits") {
Id_00510 = MarketInfo(Ls_FFD20, MODE_DIGITS);
}
else {
Id_00510 = 0;
}}}}
Ls_FFD00 = _Symbol;
tmp_str00008 = Ls_FFD30;
tmp_str00009 = _Symbol;
Li_FF97C = func_1030(tmp_str00009, 1, ((Ld_FF980 * Id_00428) / 100), Id_00510, Slippage, Id_00398, Id_004F0, tmp_str00008, MagicNumber, 0, 255);
}
if (Ii_003E0 == 1) {
if (CompareDoubles(0, StopLoss)) {
Id_00518 = 0;
}
else {
Ls_FFCF0 = Is_00410;
Ls_FFCE0 = "bid";
if (Ls_FFCF0 == NULL) {
Ls_FFCF0 = _Symbol;
}
if (Ls_FFCE0 == "ask") {
Id_007B8 = MarketInfo(Ls_FFCF0, MODE_ASK);
}
else {
if (Ls_FFCE0 == "bid") {
Id_007B8 = MarketInfo(Ls_FFCF0, MODE_BID);
}
else {
if (Ls_FFCE0 == "point") {
Id_007B8 = MarketInfo(Ls_FFCF0, MODE_POINT);
}
else {
if (Ls_FFCE0 == "digits") {
Id_007B8 = MarketInfo(Ls_FFCF0, MODE_DIGITS);
}
else {
Id_007B8 = 0;
}}}}
Id_00520 = (StopLoss * Id_001F8);
Id_00518 = (Id_007B8 - Id_00520);
}
Id_00398 = Id_00518;
if (CompareDoubles(0, TakeProfit)) {
Id_00520 = 0;
}
else {
Ls_FFCD0 = Is_00410;
Ls_FFCC0 = "ask";
if (Ls_FFCD0 == NULL) {
Ls_FFCD0 = _Symbol;
}
if (Ls_FFCC0 == "ask") {
Id_007B0 = MarketInfo(Ls_FFCD0, MODE_ASK);
}
else {
if (Ls_FFCC0 == "bid") {
Id_007B0 = MarketInfo(Ls_FFCD0, MODE_BID);
}
else {
if (Ls_FFCC0 == "point") {
Id_007B0 = MarketInfo(Ls_FFCD0, MODE_POINT);
}
else {
if (Ls_FFCC0 == "digits") {
Id_007B0 = MarketInfo(Ls_FFCD0, MODE_DIGITS);
}
else {
Id_007B0 = 0;
}}}}
Id_00520 = ((TakeProfit * Id_001F8) + Id_007B0);
}
Id_003A8 = Id_00520;
Ls_FFCB0 = EAComment;
Ls_FFCA0 = Is_00410;
Ls_FFC90 = "ask";
if (Ls_FFCA0 == NULL) {
Ls_FFCA0 = _Symbol;
}
if (Ls_FFC90 == "ask") {
Id_00540 = MarketInfo(Ls_FFCA0, MODE_ASK);
}
else {
if (Ls_FFC90 == "bid") {
Id_00540 = MarketInfo(Ls_FFCA0, MODE_BID);
}
else {
if (Ls_FFC90 == "point") {
Id_00540 = MarketInfo(Ls_FFCA0, MODE_POINT);
}
else {
if (Ls_FFC90 == "digits") {
Id_00540 = MarketInfo(Ls_FFCA0, MODE_DIGITS);
}
else {
Id_00540 = 0;
}}}}
Ls_FFC80 = _Symbol;
tmp_str0000A = Ls_FFCB0;
tmp_str0000B = _Symbol;
Li_FF97C = func_1030(tmp_str0000B, 0, ((Ld_FF980 * Id_00428) / 100), Id_00540, Slippage, Id_00398, Id_00520, tmp_str0000A, MagicNumber, 0, 16711680);
}}}}}}
if (Lb_FF9AE && UseGrid) {
Id_00548 = (GridPips * Id_001F8);
if (((Ld_FF9A0 - Id_00548) >= Ask)) {
Ii_00554 = 0;
Ii_00558 = 0;
Ii_0055C = OrdersTotal() - 1;
Ii_00560 = Ii_0055C;
if (Ii_0055C >= 0) {
do {
if (OrderSelect(Ii_00560, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_00554 < 0) {
Ii_00558 = Ii_00558 + 1;
}
else {
if (OrderType() == Ii_00554) {
Ii_00558 = Ii_00558 + 1;
}}}}
Ii_00560 = Ii_00560 - 1;
} while (Ii_00560 >= 0);
}
if (Ii_00558 > 0) {
Ii_0055C = 1;
Ii_00564 = 0;
Ii_00568 = OrdersTotal() - 1;
Ii_0056C = Ii_00568;
if (Ii_00568 >= 0) {
do {
if (OrderSelect(Ii_0056C, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_0055C < 0) {
Ii_00564 = Ii_00564 + 1;
}
else {
if (OrderType() == Ii_0055C) {
Ii_00564 = Ii_00564 + 1;
}}}}
Ii_0056C = Ii_0056C - 1;
} while (Ii_0056C >= 0);
}
if (Ii_00564 < 1) {
Ii_00568 = -1;
Ii_00570 = 0;
Ii_00574 = OrdersTotal() - 1;
Ii_00578 = Ii_00574;
if (Ii_00574 >= 0) {
do {
if (OrderSelect(Ii_00578, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_00568 < 0) {
Ii_00570 = Ii_00570 + 1;
}
else {
if (OrderType() == Ii_00568) {
Ii_00570 = Ii_00570 + 1;
}}}}
Ii_00578 = Ii_00578 - 1;
} while (Ii_00578 >= 0);
}
if (MaxOpenOrders > Ii_00570) {
Ld_FF970 = Ld_FF9B8;
Li_FF96C = -1;
Ls_FFC70 = NULL;
Ib_0057C = true;
if (Ls_FFC70 == NULL) {
Ls_FFC70 = _Symbol;
}
Ii_00580 = OrdersTotal() - 1;
Ii_00584 = Ii_00580;
if (Ii_00580 >= 0) {
do {
if (OrderSelect(Ii_00584, 0, 0) && OrderSymbol() == Ls_FFC70) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
Il_00588 = iTime(Ls_FFC70, 0, 0);
if (Il_00588 <= OrderOpenTime()) {
Ib_0057C = false;
break;
}}}
Ii_00584 = Ii_00584 - 1;
} while (Ii_00584 >= 0);
}
if (Ib_0057C) {
Ls_FFC60 = NULL;
Ib_00590 = true;
if (Ls_FFC60 == NULL) {
Ls_FFC60 = _Symbol;
}
Ii_00594 = HistoryTotal() - 1;
Ii_00598 = Ii_00594;
if (Ii_00594 >= 0) {
do {
if (OrderSelect(Ii_00598, 0, 1) && OrderSymbol() == Ls_FFC60) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() <= OP_SELL) {
Il_005A0 = iTime(Ls_FFC60, 0, 0);
if (Il_005A0 <= OrderOpenTime()) {
Ib_00590 = false;
break;
}}}}
Ii_00598 = Ii_00598 - 1;
} while (Ii_00598 >= 0);
}
if (Ib_00590) {
if (CompareDoubles(0, StopLoss)) {
Id_005A8 = 0;
}
else {
Id_005B0 = (StopLoss * Id_001F8);
Id_005A8 = (Bid - Id_005B0);
}
Id_00398 = Id_005A8;
if (CompareDoubles(0, TakeProfit)) {
Id_005B0 = 0;
}
else {
Id_005B0 = ((TakeProfit * Id_001F8) + Ask);
}
Id_003A8 = Id_005B0;
Ls_FFC50 = EAComment;
Ls_FFC40 = _Symbol;
tmp_str0000C = EAComment;
tmp_str0000D = _Symbol;
Li_FF96C = func_1030(tmp_str0000D, 0, Ld_FF970, Ask, (Slippage * Ii_001E4), Id_00398, Id_005B0, tmp_str0000C, MagicNumber, 0, 16711680);
}}
if (Ib_003B4 && Li_FF96C > 0) {
Ls_FFC30 = Is_00410;
Ib_005BC = true;
if (Ls_FFC30 == NULL) {
Ls_FFC30 = _Symbol;
}
Ii_005C0 = OrdersTotal() - 1;
Ii_005C4 = Ii_005C0;
if (Ii_005C0 >= 0) {
do {
if (OrderSelect(Ii_005C4, 0, 0) && OrderSymbol() == Ls_FFC30) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
Il_005C8 = iTime(Ls_FFC30, 0, 0);
if (Il_005C8 <= OrderOpenTime()) {
Ib_005BC = false;
break;
}}}
Ii_005C4 = Ii_005C4 - 1;
} while (Ii_005C4 >= 0);
}
if (Ib_005BC) {
Ls_FFC20 = Is_00410;
Ib_005D0 = true;
if (Ls_FFC20 == NULL) {
Ls_FFC20 = _Symbol;
}
Ii_005D4 = HistoryTotal() - 1;
Ii_005D8 = Ii_005D4;
if (Ii_005D4 >= 0) {
do {
if (OrderSelect(Ii_005D8, 0, 1) && OrderSymbol() == Ls_FFC20) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() <= OP_SELL) {
Il_005E0 = iTime(Ls_FFC20, 0, 0);
if (Il_005E0 <= OrderOpenTime()) {
Ib_005D0 = false;
break;
}}}}
Ii_005D8 = Ii_005D8 - 1;
} while (Ii_005D8 >= 0);
}
if (Ib_005D0) {
if (Ii_003E0 == 0) {
if (CompareDoubles(0, StopLoss)) {
Id_005E8 = 0;
}
else {
Ls_FFC10 = Is_00410;
Ls_FFC00 = "bid";
if (Ls_FFC10 == NULL) {
Ls_FFC10 = _Symbol;
}
if (Ls_FFC00 == "ask") {
Id_007A8 = MarketInfo(Ls_FFC10, MODE_ASK);
}
else {
if (Ls_FFC00 == "bid") {
Id_007A8 = MarketInfo(Ls_FFC10, MODE_BID);
}
else {
if (Ls_FFC00 == "point") {
Id_007A8 = MarketInfo(Ls_FFC10, MODE_POINT);
}
else {
if (Ls_FFC00 == "digits") {
Id_007A8 = MarketInfo(Ls_FFC10, MODE_DIGITS);
}
else {
Id_007A8 = 0;
}}}}
Id_005F0 = (StopLoss * Id_001F8);
Id_005E8 = (Id_007A8 - Id_005F0);
}
Id_00398 = Id_005E8;
if (CompareDoubles(0, TakeProfit)) {
Id_005F0 = 0;
}
else {
Ls_FFBF0 = Is_00410;
Ls_FFBE0 = "ask";
if (Ls_FFBF0 == NULL) {
Ls_FFBF0 = _Symbol;
}
if (Ls_FFBE0 == "ask") {
Id_007A0 = MarketInfo(Ls_FFBF0, MODE_ASK);
}
else {
if (Ls_FFBE0 == "bid") {
Id_007A0 = MarketInfo(Ls_FFBF0, MODE_BID);
}
else {
if (Ls_FFBE0 == "point") {
Id_007A0 = MarketInfo(Ls_FFBF0, MODE_POINT);
}
else {
if (Ls_FFBE0 == "digits") {
Id_007A0 = MarketInfo(Ls_FFBF0, MODE_DIGITS);
}
else {
Id_007A0 = 0;
}}}}
Id_005F0 = ((TakeProfit * Id_001F8) + Id_007A0);
}
Id_003A8 = Id_005F0;
Ls_FFBD0 = EAComment;
Ls_FFBC0 = Is_00410;
Ls_FFBB0 = "ask";
if (Ls_FFBC0 == NULL) {
Ls_FFBC0 = _Symbol;
}
if (Ls_FFBB0 == "ask") {
Id_00610 = MarketInfo(Ls_FFBC0, MODE_ASK);
}
else {
if (Ls_FFBB0 == "bid") {
Id_00610 = MarketInfo(Ls_FFBC0, MODE_BID);
}
else {
if (Ls_FFBB0 == "point") {
Id_00610 = MarketInfo(Ls_FFBC0, MODE_POINT);
}
else {
if (Ls_FFBB0 == "digits") {
Id_00610 = MarketInfo(Ls_FFBC0, MODE_DIGITS);
}
else {
Id_00610 = 0;
}}}}
Ls_FFBA0 = _Symbol;
tmp_str0000E = Ls_FFBD0;
tmp_str0000F = _Symbol;
Li_FF96C = func_1030(tmp_str0000F, 0, ((Ld_FF970 * Id_00428) / 100), Id_00610, Slippage, Id_00398, Id_005F0, tmp_str0000E, MagicNumber, 0, 16711680);
}
if (Ii_003E0 == 1) {
if (CompareDoubles(0, StopLoss)) {
Id_00618 = 0;
}
else {
Ls_FFB90 = Is_00410;
Ls_FFB80 = "ask";
if (Ls_FFB90 == NULL) {
Ls_FFB90 = _Symbol;
}
if (Ls_FFB80 == "ask") {
Id_00798 = MarketInfo(Ls_FFB90, MODE_ASK);
}
else {
if (Ls_FFB80 == "bid") {
Id_00798 = MarketInfo(Ls_FFB90, MODE_BID);
}
else {
if (Ls_FFB80 == "point") {
Id_00798 = MarketInfo(Ls_FFB90, MODE_POINT);
}
else {
if (Ls_FFB80 == "digits") {
Id_00798 = MarketInfo(Ls_FFB90, MODE_DIGITS);
}
else {
Id_00798 = 0;
}}}}
Id_00618 = ((StopLoss * Id_001F8) + Id_00798);
}
Id_00398 = Id_00618;
if (CompareDoubles(0, TakeProfit)) {
Id_00618 = 0;
}
else {
Ls_FFB70 = Is_00410;
Ls_FFB60 = "bid";
if (Ls_FFB70 == NULL) {
Ls_FFB70 = _Symbol;
}
if (Ls_FFB60 == "ask") {
Id_00788 = MarketInfo(Ls_FFB70, MODE_ASK);
}
else {
if (Ls_FFB60 == "bid") {
Id_00788 = MarketInfo(Ls_FFB70, MODE_BID);
}
else {
if (Ls_FFB60 == "point") {
Id_00788 = MarketInfo(Ls_FFB70, MODE_POINT);
}
else {
if (Ls_FFB60 == "digits") {
Id_00788 = MarketInfo(Ls_FFB70, MODE_DIGITS);
}
else {
Id_00788 = 0;
}}}}
Id_00790 = (TakeProfit * Id_001F8);
Id_00618 = (Id_00788 - Id_00790);
}
Id_003A8 = Id_00618;
Ls_FFB50 = EAComment;
Ls_FFB40 = Is_00410;
Ls_FFB30 = "bid";
if (Ls_FFB40 == NULL) {
Ls_FFB40 = _Symbol;
}
if (Ls_FFB30 == "ask") {
Id_00638 = MarketInfo(Ls_FFB40, MODE_ASK);
}
else {
if (Ls_FFB30 == "bid") {
Id_00638 = MarketInfo(Ls_FFB40, MODE_BID);
}
else {
if (Ls_FFB30 == "point") {
Id_00638 = MarketInfo(Ls_FFB40, MODE_POINT);
}
else {
if (Ls_FFB30 == "digits") {
Id_00638 = MarketInfo(Ls_FFB40, MODE_DIGITS);
}
else {
Id_00638 = 0;
}}}}
Ls_FFB20 = _Symbol;
tmp_str00010 = Ls_FFB50;
tmp_str00011 = _Symbol;
Li_FF96C = func_1030(tmp_str00011, 1, ((Ld_FF970 * Id_00428) / 100), Id_00638, Slippage, Id_00398, Id_00618, tmp_str00010, MagicNumber, 0, 255);
}}}}}}}}}
if (Lb_FF9AE && UseGrid && (((GridPips * Id_001F8) + Ld_FF998) <= Bid)) {
Ii_0064C = 1;
Ii_00650 = 0;
Ii_00654 = OrdersTotal() - 1;
Ii_00658 = Ii_00654;
if (Ii_00654 >= 0) {
do {
if (OrderSelect(Ii_00658, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_0064C < 0) {
Ii_00650 = Ii_00650 + 1;
}
else {
if (OrderType() == Ii_0064C) {
Ii_00650 = Ii_00650 + 1;
}}}}
Ii_00658 = Ii_00658 - 1;
} while (Ii_00658 >= 0);
}
if (Ii_00650 > 0) {
Ii_00654 = 0;
Ii_0065C = 0;
Ii_00660 = OrdersTotal() - 1;
Ii_00664 = Ii_00660;
if (Ii_00660 >= 0) {
do {
if (OrderSelect(Ii_00664, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_00654 < 0) {
Ii_0065C = Ii_0065C + 1;
}
else {
if (OrderType() == Ii_00654) {
Ii_0065C = Ii_0065C + 1;
}}}}
Ii_00664 = Ii_00664 - 1;
} while (Ii_00664 >= 0);
}
if (Ii_0065C < 1 && (Ld_FF998 != 0)) {
Ii_00660 = -1;
Ii_0066C = 0;
Ii_00670 = OrdersTotal() - 1;
Ii_00674 = Ii_00670;
if (Ii_00670 >= 0) {
do {
if (OrderSelect(Ii_00674, 0, 0) && OrderSymbol() == _Symbol) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (Ii_00660 < 0) {
Ii_0066C = Ii_0066C + 1;
}
else {
if (OrderType() == Ii_00660) {
Ii_0066C = Ii_0066C + 1;
}}}}
Ii_00674 = Ii_00674 - 1;
} while (Ii_00674 >= 0);
}
if (MaxOpenOrders > Ii_0066C) {
Ld_FF960 = Ld_FF9B0;
Li_FF95C = -1;
Ls_FFB10 = NULL;
Ib_00678 = true;
if (Ls_FFB10 == NULL) {
Ls_FFB10 = _Symbol;
}
Ii_0067C = OrdersTotal() - 1;
Ii_00680 = Ii_0067C;
if (Ii_0067C >= 0) {
do {
if (OrderSelect(Ii_00680, 0, 0) && OrderSymbol() == Ls_FFB10) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
Il_00688 = iTime(Ls_FFB10, 0, 0);
if (Il_00688 <= OrderOpenTime()) {
Ib_00678 = false;
break;
}}}
Ii_00680 = Ii_00680 - 1;
} while (Ii_00680 >= 0);
}
if (Ib_00678) {
Ls_FFB00 = NULL;
Ib_00690 = true;
if (Ls_FFB00 == NULL) {
Ls_FFB00 = _Symbol;
}
Ii_00694 = HistoryTotal() - 1;
Ii_00698 = Ii_00694;
if (Ii_00694 >= 0) {
do {
if (OrderSelect(Ii_00698, 0, 1) && OrderSymbol() == Ls_FFB00) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() <= OP_SELL) {
Il_006A0 = iTime(Ls_FFB00, 0, 0);
if (Il_006A0 <= OrderOpenTime()) {
Ib_00690 = false;
break;
}}}}
Ii_00698 = Ii_00698 - 1;
} while (Ii_00698 >= 0);
}
if (Ib_00690) {
if (CompareDoubles(0, StopLoss)) {
Id_006A8 = 0;
}
else {
Id_006A8 = ((StopLoss * Id_001F8) + Ask);
}
Id_00398 = Id_006A8;
if (CompareDoubles(0, TakeProfit)) {
Id_006A8 = 0;
}
else {
Id_00780 = (TakeProfit * Id_001F8);
Id_006A8 = (Bid - Id_00780);
}
Id_003A8 = Id_006A8;
Ls_FFAF0 = EAComment;
Ls_FFAE0 = _Symbol;
tmp_str00012 = EAComment;
tmp_str00013 = _Symbol;
Li_FF95C = func_1030(tmp_str00013, 1, Ld_FF960, Bid, (Slippage * Ii_001E4), Id_00398, Id_006A8, tmp_str00012, MagicNumber, 0, 255);
}}
if (Ib_003B4 && Li_FF95C > 0) {
Ls_FFAD0 = Is_00410;
Ib_006B4 = true;
if (Ls_FFAD0 == NULL) {
Ls_FFAD0 = _Symbol;
}
Ii_006B8 = OrdersTotal() - 1;
Ii_006BC = Ii_006B8;
if (Ii_006B8 >= 0) {
do {
if (OrderSelect(Ii_006BC, 0, 0) && OrderSymbol() == Ls_FFAD0) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
Il_006C0 = iTime(Ls_FFAD0, 0, 0);
if (Il_006C0 <= OrderOpenTime()) {
Ib_006B4 = false;
break;
}}}
Ii_006BC = Ii_006BC - 1;
} while (Ii_006BC >= 0);
}
if (Ib_006B4) {
Ls_FFAC0 = Is_00410;
Ib_006C8 = true;
if (Ls_FFAC0 == NULL) {
Ls_FFAC0 = _Symbol;
}
Ii_006CC = HistoryTotal() - 1;
Ii_006D0 = Ii_006CC;
if (Ii_006CC >= 0) {
do {
if (OrderSelect(Ii_006D0, 0, 1) && OrderSymbol() == Ls_FFAC0) {
if (OrderMagicNumber() == 0 || OrderMagicNumber() == MagicNumber) {
if (OrderType() <= OP_SELL) {
Il_006D8 = iTime(Ls_FFAC0, 0, 0);
if (Il_006D8 <= OrderOpenTime()) {
Ib_006C8 = false;
break;
}}}}
Ii_006D0 = Ii_006D0 - 1;
} while (Ii_006D0 >= 0);
}
if (Ib_006C8) {
if (Ii_003E0 == 0) {
if (CompareDoubles(0, StopLoss)) {
Id_006E0 = 0;
}
else {
Ls_FFAB0 = Is_00410;
Ls_FFAA0 = "ask";
if (Ls_FFAB0 == NULL) {
Ls_FFAB0 = _Symbol;
}
if (Ls_FFAA0 == "ask") {
Id_00778 = MarketInfo(Ls_FFAB0, MODE_ASK);
}
else {
if (Ls_FFAA0 == "bid"Показано первые 50% кода (символов: 97838)
Открыть по тарифу
Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.
Разовая покупка файла
На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.
Зачем нужен email? После подтверждения оплаты файл сохранится в кабинете на этот email. Если аккаунта ещё нет, мы создадим его и пришлём ссылку для задания пароля. Если аккаунт уже есть, покупка добавится в него. Укажите адрес, к которому у вас есть доступ.
Чтобы оформить заказ, введите email и перейдите к оплате.