m-sniper ea.mq4
Сообщите нам, если считаете, что материал размещён без разрешения.
Сообщить о материале
Обращение по товару «m-sniper ea.mq4» отправится на рассмотрение. Укажите контакт для ответа и опишите причину.
О программе
Данный продукт представляет собой торговый советник для платформы MetaTrader 4, работающий с девятью валютными парами одновременно. Советник обеспечивает автоматический анализ рыночной ситуации и отправку торговых ордеров на покупку и продажу с использованием встроенных торговых API платформы.
Продукт включает настраиваемые параметры риска, лотности и торговых часов, а также поддерживает ручной и автоматический режимы торговли. Доступна функция сеточной торговли, управление позициями по профиту и убытку, а также разгрузка позиций на ночь.
В состав советника входит информационная панель, отображающая данные о балансе, марже и прибыли по каждой паре, и торговая панель с интерактивными кнопками для ручного управления ордерами. Поддерживается переключение интерфейса между русским и английским языками.
Настройки программы
| Настройка | Описание |
|---|---|
| Languale | Язык интерфейса — Язык интерфейса советника |
| UseLotManual | Ручной лот переключатель — Переключатель ручного задания размера лота |
| ManualLot | Ручной лот — Размер лота при ручном задании объёма |
| Risk | Процент риска — Процент риска от баланса счёта для расчёта размера лота |
| StopLossProcent | Процент стоп-профита — Процент убытка от баланса для принудительного закрытия позиций |
| TimeFrame | Таймфрейм — Таймфрейм для анализа свечей |
| PipsStep | Шаг пунктов сигнала — Шаг в пунктах для сравнения диапазонов баров при формировании сигнала |
| MinPips | Минимум пунктов сигнала — Минимальное значение в пунктах для формирования торгового сигнала |
| ProfitPips | Пункты профита для закрытия — Значение в пунктах для закрытия позиций по достижении профита |
| pEURUSD | Пара EURUSD — Название валютной пары EURUSD |
| pEURUSD_Step | Шаг сетки EURUSD — Шаг сетки в пунктах для пары EURUSD |
| pGBPUSD | Пара GBPUSD — Название валютной пары GBPUSD |
| pGBPUSD_Step | Шаг сетки GBPUSD — Шаг сетки в пунктах для пары GBPUSD |
| pAUDUSD | Пара AUDUSD — Название валютной пары AUDUSD |
| pAUDUSD_Step | Шаг сетки AUDUSD — Шаг сетки в пунктах для пары AUDUSD |
| pNZDUSD | Пара NZDUSD — Название валютной пары NZDUSD |
| pNZDUSD_Step | Шаг сетки NZDUSD — Шаг сетки в пунктах для пары NZDUSD |
| pUSDJPY | Пара USDJPY — Название валютной пары USDJPY |
| pUSDJPY_Step | Шаг сетки USDJPY — Шаг сетки в пунктах для пары USDJPY |
| pUSDCAD | Пара USDCAD — Название валютной пары USDCAD |
| pUSDCAD_Step | Шаг сетки USDCAD — Шаг сетки в пунктах для пары USDCAD |
| pUSDCHF | Пара USDCHF — Название валютной пары USDCHF |
| pUSDCHF_Step | Шаг сетки USDCHF — Шаг сетки в пунктах для пары USDCHF |
| pEURJPY | Пара EURJPY — Название валютной пары EURJPY |
| pEURJPY_Step | Шаг сетки EURJPY — Шаг сетки в пунктах для пары EURJPY |
| pGBPJPY | Пара GBPJPY — Название валютной пары GBPJPY |
| pGBPJPY_Step | Шаг сетки GBPJPY — Шаг сетки в пунктах для пары GBPJPY |
| MaxOrders | Максимальное число ордеров — Максимальное количество ордеров на счёте |
| TimeStart | Время начала торговли — Время начала торговой сессии в часах |
| TimeEnd | Время окончания торговли — Время окончания торговой сессии в часах |
| MobClosPair | Пара закрытия мобильной торговли — Название пары для закрытия мобильной торговли |
| FonColor | Цвет фона — Основной цвет фона панелей и информационных блоков |
| FontSize | Размер шрифта панели — Размер шрифта на элементах торговой панели |
| FontSizeInfo | Размер шрифта инфопанели — Размер шрифта на информационной панели |
| SpeedEA | Скорость таймера — Скорость работы таймера советника в миллисекундах |
| TXTButton | Цвет текста кнопок — Цвет текста на кнопках |
| ClickButton | Цвет кнопки при нажатии — Цвет фона кнопок при активном состоянии |
| FonButtonInfo | Цвет кнопки INFO — Цвет фона кнопки информационной панели |
| FonButtonBuy | Цвет кнопки BUY — Цвет фона кнопки покупки на торговой панели |
| FonButtonSell | Цвет кнопки SELL — Цвет фона кнопки продажи на торговой панели |
| TextButtonBS | Цвет текста BUY/SELL — Цвет текста на кнопках BUY и SELL |
| FonButton | Цвет фона кнопок — Цвет фона обычных кнопок интерфейса |
| TextColor | Цвет текста меток — Цвет текста на информационных метках |
| ButtonBorder | Цвет границы кнопок — Цвет границы графических кнопок и элементов интерфейса |
| InfoDataColor | Цвет данных инфопанели — Цвет числовых данных на информационной панели |
| InfoDataColorText | Цвет текста данных инфопанели — Цвет текстовых заголовков данных на информационной панели |
| EditColor | Цвет фона поля ввода — Цвет фона поля ввода на торговой панели |
| Magic | Магический номер — Магический номер для идентификации ордеров советника |
| Id0 | Номер идентификации — Идентификационный номер, используемый при привязке к счёту |
Поиск по коду файла
#property version "1.00"
#property strict
enum Lang{
r=0, //RU
e=1, //EN
};
input Lang Languale =1;
input bool UseLotManual =false;
input double ManualLot =0.01;
input double Risk =1;
input double StopLossProcent =0;
input int TimeFrame =1;
input double PipsStep =30;
input double MinPips =30;
input int ProfitPips =25;
input string pEURUSD ="EURUSD";
input int pEURUSD_Step =80;
input string pGBPUSD ="GBPUSD";
input int pGBPUSD_Step =100;
input string pAUDUSD ="AUDUSD";
input int pAUDUSD_Step =70;
input string pNZDUSD ="NZDUSD";
input int pNZDUSD_Step =70;
input string pUSDJPY ="USDJPY";
input int pUSDJPY_Step =60;
input string pUSDCAD ="USDCAD";
input int pUSDCAD_Step =120;
input string pUSDCHF ="USDCHF";
input int pUSDCHF_Step =120;
input string pEURJPY ="EURJPY";
input int pEURJPY_Step =110;
input string pGBPJPY ="GBPJPY";
input int pGBPJPY_Step =150;
input int MaxOrders =100;
input double TimeStart =3;
input double TimeEnd =23;
input string MobClosPair ="EURAUD";
input color FonColor =Black;
input int FontSize =7;
input int FontSizeInfo =7;
input int SpeedEA =100;
input color TXTButton =Red;
input color ClickButton =Black;
input color FonButtonInfo =White;
input color FonButtonBuy =Blue;
input color FonButtonSell =Red;
input color TextButtonBS =White;
input color FonButton =White;
input color TextColor =White;
input color ButtonBorder =Blue;
input color InfoDataColor =Red;
input color InfoDataColorText =Red;
input color EditColor =Black;
input int Magic =888;
input int Id0 =0;
string comment = "www.mforex.pro";
int BWidth = 60;
int BHeigh = 20;
int DeyLimit =0;
int o;
double Lot_1 =0;
double Lot_2 =0;
double Lot_3 =0;
double Lot_4 =0;
double Lot_5 =0;
double Lot_6 =0;
double Lot_7 =0;
double Lot_8 =0;
double Lot_9 =0;
int D_1,D_2,D_3,D_4,D_5,D_6,D_7,D_8,D_9;
int dig_1,dig_2,dig_3,dig_4,dig_5,dig_6,dig_7,dig_8,dig_9;
static double TimeClose =0;
string PairName;
string TextOn;
string TextOff;
bool Demo =false;
bool LimitLicense =true;
int DeyLicense =7;
int AccNumber =0;
int OnInit()
{
// код доступен только после оплаты
}
void OnDeinit(const int reason)
{
ObjectsDeleteAll(0,OBJ_LABEL);
EventKillTimer();
ObjectsDeleteAll(0,OBJ_BUTTON);
ObjectsDeleteAll(0,OBJ_EDIT);
ObjectsDeleteAll(0,OBJ_RECTANGLE_LABEL);
}
void OnTick()
{
// код доступен только после оплаты
}
string P_1,P_2,P_3,P_4,P_5,P_6,P_7,P_8,P_9;
if(IsTesting())
{P_1=Symbol();
P_2=Symbol();
P_3=Symbol();
P_4=Symbol();
P_5=Symbol();
P_6=Symbol();
P_7=Symbol();
P_8=Symbol();
P_9=Symbol();}
else
{P_1=pEURUSD;
P_2=pGBPUSD;
P_3=pAUDUSD;
P_4=pNZDUSD;
P_5=pUSDJPY;
P_6=pUSDCAD;
P_7=pUSDCHF;
P_8=pEURJPY;
P_9=pGBPJPY;}
if(AccNumber>0 && AccountNumber()!=AccNumber)
{
if(Languale==0)
{
RectLabelCreate("ERROR_FON",850,100,300,120,FonColor,1);
PutLabelD("ERROR_TEXT1",780,110,"НЕ ВЕРНЫЙ НОМЕР СЧЕТА!",1);
PutLabelT("ERROR_TEXT2",845,130,"Обратитесь к автору:",1);
PutLabelT("ERROR_TEXT3",845,150,"Скайп:",1);
PutLabelD("ERROR_TEXT4",780,150,"live:mforex.pro",1);
PutLabelT("ERROR_TEXT5",845,170,"Телеграм:",1);
PutLabelD("ERROR_TEXT6",780,170,"@mforexpro",1);
PutLabelT("ERROR_TEXT7",845,190,"Почта:",1);
PutLabelD("ERROR_TEXT8",780,190,"m********o*@gmail.com",1);
}
if(Languale==1)
{
RectLabelCreate("ERROR_FON",850,100,300,120,FonColor,1);
PutLabelD("ERROR_TEXT1",780,110,"NOT A VALID ACCOUNT NUMBER!",1);
PutLabelT("ERROR_TEXT2",845,130,"Contact the author:",1);
PutLabelT("ERROR_TEXT3",845,150,"Skype:",1);
PutLabelD("ERROR_TEXT4",780,150,"live:mforex.pro",1);
PutLabelT("ERROR_TEXT5",845,170,"Telegram:",1);
PutLabelD("ERROR_TEXT6",780,170,"@mforexpro",1);
PutLabelT("ERROR_TEXT7",845,190,"E-Mail:",1);
PutLabelD("ERROR_TEXT8",780,190,"m********o*@gmail.com",1);
}
}
else
{
if(Demo && IsDemo()==false)
{
if(Languale==0)
{
RectLabelCreate("ERROR_FON",850,100,320,120,FonColor,1);
PutLabelD("ERROR_TEXT1",845,110,"ВАША ВЕРСИЯ РАБОТАЕТ ТОЛЬКО НА ДЕМО СЧЕТЕ!",1);
PutLabelT("ERROR_TEXT2",845,130,"Обратитесь к автору:",1);
PutLabelT("ERROR_TEXT3",845,150,"Скайп:",1);
PutLabelD("ERROR_TEXT4",780,150,"live:mforex.pro",1);
PutLabelT("ERROR_TEXT5",845,170,"Телеграм:",1);
PutLabelD("ERROR_TEXT6",780,170,"@mforexpro",1);
PutLabelT("ERROR_TEXT7",845,190,"Почта:",1);
PutLabelD("ERROR_TEXT8",780,190,"m********o*@gmail.com",1);
}
if(Languale==1)
{
RectLabelCreate("ERROR_FON",850,100,320,120,FonColor,1);
PutLabelD("ERROR_TEXT1",845,110,"YOUR VERSION ONLY WORKS ON DEMO ACCOUNT!",1);
PutLabelT("ERROR_TEXT2",845,130,"Contact the author:",1);
PutLabelT("ERROR_TEXT3",845,150,"Skype:",1);
PutLabelD("ERROR_TEXT4",780,150,"live:mforex.pro",1);
PutLabelT("ERROR_TEXT5",845,170,"Telegram:",1);
PutLabelD("ERROR_TEXT6",780,170,"@mforexpro",1);
PutLabelT("ERROR_TEXT7",845,190,"E-Mail:",1);
PutLabelD("ERROR_TEXT8",780,190,"m********o*@gmail.com",1);
}
}
if(!Demo || (Demo && IsDemo()==true))
{
if(UseLotManual)
{
Lot_1=ManualLot;
Lot_2=ManualLot;
Lot_3=ManualLot;
Lot_4=ManualLot;
Lot_5=ManualLot;
Lot_6=ManualLot;
Lot_7=ManualLot;
Lot_8=ManualLot;
Lot_9=ManualLot;
}
else
{
if(MarketInfo(P_1,MODE_LOTSTEP)==0.01) dig_1 =2;
if(MarketInfo(P_1,MODE_LOTSTEP)==0.10) dig_1 =1;
if(MarketInfo(P_1,MODE_LOTSTEP)==1.00) dig_1 =0;
Lot_1=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(P_1,MODE_TICKVALUE)*100*D_1),dig_1);
if(Lot_1<MarketInfo(P_1,MODE_MINLOT)) {Lot_1=MarketInfo(P_1,MODE_MINLOT);}
if(Lot_1>=MarketInfo(P_1,MODE_MAXLOT)) {Lot_1=MarketInfo(P_1,MODE_MAXLOT);}
if(MarketInfo(P_2,MODE_LOTSTEP)==0.01) dig_2 =2;
if(MarketInfo(P_2,MODE_LOTSTEP)==0.10) dig_2 =1;
if(MarketInfo(P_2,MODE_LOTSTEP)==1.00) dig_2 =0;
Lot_2=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(P_2,MODE_TICKVALUE)*100*D_2),dig_2);
if(Lot_2<MarketInfo(P_2,MODE_MINLOT)) {Lot_2=MarketInfo(P_2,MODE_MINLOT);}
if(Lot_2>=MarketInfo(P_2,MODE_MAXLOT)) {Lot_2=MarketInfo(P_2,MODE_MAXLOT);}
if(MarketInfo(P_3,MODE_LOTSTEP)==0.01) dig_3 =2;
if(MarketInfo(P_3,MODE_LOTSTEP)==0.10) dig_3 =1;
if(MarketInfo(P_3,MODE_LOTSTEP)==1.00) dig_3 =0;
Lot_3=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(P_3,MODE_TICKVALUE)*100*D_3),dig_3);
if(Lot_3<MarketInfo(P_3,MODE_MINLOT)) {Lot_3=MarketInfo(P_3,MODE_MINLOT);}
if(Lot_3>=MarketInfo(P_3,MODE_MAXLOT)) {Lot_3=MarketInfo(P_3,MODE_MAXLOT);}
if(MarketInfo(P_4,MODE_LOTSTEP)==0.01) dig_4 =2;
if(MarketInfo(P_4,MODE_LOTSTEP)==0.10) dig_4 =1;
if(MarketInfo(P_4,MODE_LOTSTEP)==1.00) dig_4 =0;
Lot_4=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(P_4,MODE_TICKVALUE)*100*D_4),dig_4);
if(Lot_4<MarketInfo(P_4,MODE_MINLOT)) {Lot_4=MarketInfo(P_4,MODE_MINLOT);}
if(Lot_4>=MarketInfo(P_4,MODE_MAXLOT)) {Lot_4=MarketInfo(P_4,MODE_MAXLOT);}
if(MarketInfo(P_5,MODE_LOTSTEP)==0.01) dig_5 =2;
if(MarketInfo(P_5,MODE_LOTSTEP)==0.10) dig_5 =1;
if(MarketInfo(P_5,MODE_LOTSTEP)==1.00) dig_5 =0;
Lot_5=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(P_5,MODE_TICKVALUE)*100*D_5),dig_5);
if(Lot_5<MarketInfo(P_5,MODE_MINLOT)) {Lot_5=MarketInfo(P_5,MODE_MINLOT);}
if(Lot_5>=MarketInfo(P_5,MODE_MAXLOT)) {Lot_5=MarketInfo(P_5,MODE_MAXLOT);}
if(MarketInfo(P_6,MODE_LOTSTEP)==0.01) dig_6 =2;
if(MarketInfo(P_6,MODE_LOTSTEP)==0.10) dig_6 =1;
if(MarketInfo(P_6,MODE_LOTSTEP)==1.00) dig_6 =0;
Lot_6=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(P_6,MODE_TICKVALUE)*100*D_6),dig_6);
if(Lot_6<MarketInfo(P_6,MODE_MINLOT)) {Lot_6=MarketInfo(P_6,MODE_MINLOT);}
if(Lot_6>=MarketInfo(P_6,MODE_MAXLOT)) {Lot_6=MarketInfo(P_6,MODE_MAXLOT);}
if(MarketInfo(P_7,MODE_LOTSTEP)==0.01) dig_7 =2;
if(MarketInfo(P_7,MODE_LOTSTEP)==0.10) dig_7 =1;
if(MarketInfo(P_7,MODE_LOTSTEP)==1.00) dig_7 =0;
Lot_7=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(P_7,MODE_TICKVALUE)*100*D_7),dig_7);
if(Lot_7<MarketInfo(P_7,MODE_MINLOT)) {Lot_7=MarketInfo(P_7,MODE_MINLOT);}
if(Lot_7>=MarketInfo(P_7,MODE_MAXLOT)) {Lot_7=MarketInfo(P_7,MODE_MAXLOT);}
if(MarketInfo(P_8,MODE_LOTSTEP)==0.01) dig_8 =2;
if(MarketInfo(P_8,MODE_LOTSTEP)==0.10) dig_8 =1;
if(MarketInfo(P_8,MODE_LOTSTEP)==1.00) dig_8 =0;
Lot_8=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(P_8,MODE_TICKVALUE)*100*D_8),dig_8);
if(Lot_8<MarketInfo(P_8,MODE_MINLOT)) {Lot_8=MarketInfo(P_8,MODE_MINLOT);}
if(Lot_8>=MarketInfo(P_8,MODE_MAXLOT)) {Lot_8=MarketInfo(P_8,MODE_MAXLOT);}
if(MarketInfo(P_9,MODE_LOTSTEP)==0.01) dig_9 =2;
if(MarketInfo(P_9,MODE_LOTSTEP)==0.10) dig_9 =1;
if(MarketInfo(P_9,MODE_LOTSTEP)==1.00) dig_9 =0;
Lot_9=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(P_9,MODE_TICKVALUE)*100*D_9),dig_9);
if(Lot_9<MarketInfo(P_9,MODE_MINLOT)) {Lot_9=MarketInfo(P_9,MODE_MINLOT);}
if(Lot_9>=MarketInfo(P_9,MODE_MAXLOT)) {Lot_9=MarketInfo(P_9,MODE_MAXLOT);}
}
bool GoBuy_1 =false;
bool GoSell_1 =false;
if (iOpen(P_1,TimeFrame,1)>iClose(P_1,TimeFrame,1) && (iOpen(P_1,TimeFrame,1)-iClose(P_1,TimeFrame,1))/Point>=MinPips &&
(iOpen(P_1,TimeFrame,1)-iClose(P_1,TimeFrame,1))/Point>=(iHigh(P_1,TimeFrame,2)-iLow(P_1,TimeFrame,2))/Point*PipsStep)
{GoSell_1=true;}
if (iOpen(P_1,TimeFrame,1)<iClose(P_1,TimeFrame,1) && (iClose(P_1,TimeFrame,1)-iOpen(P_1,TimeFrame,1))/Point>=MinPips &&
(iClose(P_1,TimeFrame,1)-iOpen(P_1,TimeFrame,1))/Point>=(iHigh(P_1,TimeFrame,2)-iLow(P_1,TimeFrame,2))/Point*PipsStep)
{GoBuy_1=true;}
bool GoBuy_2 =false;
bool GoSell_2 =false;
if (iOpen(P_2,TimeFrame,1)>iClose(P_2,TimeFrame,1) && (iOpen(P_2,TimeFrame,1)-iClose(P_2,TimeFrame,1))/Point>=MinPips &&
(iOpen(P_2,TimeFrame,1)-iClose(P_2,TimeFrame,1))/Point>=(iHigh(P_2,TimeFrame,2)-iLow(P_2,TimeFrame,2))/Point*PipsStep)
{GoSell_2=true;}
if (iOpen(P_2,TimeFrame,1)<iClose(P_2,TimeFrame,1) && (iClose(P_2,TimeFrame,1)-iOpen(P_2,TimeFrame,1))/Point>=MinPips &&
(iClose(P_2,TimeFrame,1)-iOpen(P_2,TimeFrame,1))/Point>=(iHigh(P_2,TimeFrame,2)-iLow(P_2,TimeFrame,2))/Point*PipsStep)
{GoBuy_2=true;}
bool GoBuy_3 =false;
bool GoSell_3 =false;
if (iOpen(P_3,TimeFrame,1)>iClose(P_3,TimeFrame,1) && (iOpen(P_3,TimeFrame,1)-iClose(P_3,TimeFrame,1))/Point>=MinPips &&
(iOpen(P_3,TimeFrame,1)-iClose(P_3,TimeFrame,1))/Point>=(iHigh(P_3,TimeFrame,2)-iLow(P_3,TimeFrame,2))/Point*PipsStep)
{GoSell_3=true;}
if (iOpen(P_3,TimeFrame,1)<iClose(P_3,TimeFrame,1) && (iClose(P_3,TimeFrame,1)-iOpen(P_3,TimeFrame,1))/Point>=MinPips &&
(iClose(P_3,TimeFrame,1)-iOpen(P_3,TimeFrame,1))/Point>=(iHigh(P_3,TimeFrame,2)-iLow(P_3,TimeFrame,2))/Point*PipsStep)
{GoBuy_3=true;}
bool GoBuy_4 =false;
bool GoSell_4 =false;
if (iOpen(P_4,TimeFrame,1)>iClose(P_4,TimeFrame,1) && (iOpen(P_4,TimeFrame,1)-iClose(P_4,TimeFrame,1))/Point>=MinPips &&
(iOpen(P_4,TimeFrame,1)-iClose(P_4,TimeFrame,1))/Point>=(iHigh(P_4,TimeFrame,2)-iLow(P_4,TimeFrame,2))/Point*PipsStep)
{GoSell_4=true;}
if (iOpen(P_4,TimeFrame,1)<iClose(P_4,TimeFrame,1) && (iClose(P_4,TimeFrame,1)-iOpen(P_4,TimeFrame,1))/Point>=MinPips &&
(iClose(P_4,TimeFrame,1)-iOpen(P_4,TimeFrame,1))/Point>=(iHigh(P_4,TimeFrame,2)-iLow(P_4,TimeFrame,2))/Point*PipsStep)
{GoBuy_4=true;}
bool GoBuy_5 =false;
bool GoSell_5 =false;
if (iOpen(P_5,TimeFrame,1)>iClose(P_5,TimeFrame,1) && (iOpen(P_5,TimeFrame,1)-iClose(P_5,TimeFrame,1))/Point>=MinPips &&
(iOpen(P_5,TimeFrame,1)-iClose(P_5,TimeFrame,1))/Point>=(iHigh(P_5,TimeFrame,2)-iLow(P_5,TimeFrame,2))/Point*PipsStep)
{GoSell_5=true;}
if (iOpen(P_5,TimeFrame,1)<iClose(P_5,TimeFrame,1) && (iClose(P_5,TimeFrame,1)-iOpen(P_5,TimeFrame,1))/Point>=MinPips &&
(iClose(P_5,TimeFrame,1)-iOpen(P_5,TimeFrame,1))/Point>=(iHigh(P_5,TimeFrame,2)-iLow(P_5,TimeFrame,2))/Point*PipsStep)
{GoBuy_5=true;}
bool GoBuy_6 =false;
bool GoSell_6 =false;
if (iOpen(P_6,TimeFrame,1)>iClose(P_6,TimeFrame,1) && (iOpen(P_6,TimeFrame,1)-iClose(P_6,TimeFrame,1))/Point>=MinPips &&
(iOpen(P_6,TimeFrame,1)-iClose(P_6,TimeFrame,1))/Point>=(iHigh(P_6,TimeFrame,2)-iLow(P_6,TimeFrame,2))/Point*PipsStep)
{GoSell_6=true;}
if (iOpen(P_6,TimeFrame,1)<iClose(P_6,TimeFrame,1) && (iClose(P_6,TimeFrame,1)-iOpen(P_6,TimeFrame,1))/Point>=MinPips &&
(iClose(P_6,TimeFrame,1)-iOpen(P_6,TimeFrame,1))/Point>=(iHigh(P_6,TimeFrame,2)-iLow(P_6,TimeFrame,2))/Point*PipsStep)
{GoBuy_6=true;}
bool GoBuy_7 =false;
bool GoSell_7 =false;
if (iOpen(P_7,TimeFrame,1)>iClose(P_7,TimeFrame,1) && (iOpen(P_7,TimeFrame,1)-iClose(P_7,TimeFrame,1))/Point>=MinPips &&
(iOpen(P_7,TimeFrame,1)-iClose(P_7,TimeFrame,1))/Point>=(iHigh(P_7,TimeFrame,2)-iLow(P_7,TimeFrame,2))/Point*PipsStep)
{GoSell_7=true;}
if (iOpen(P_7,TimeFrame,1)<iClose(P_7,TimeFrame,1) && (iClose(P_7,TimeFrame,1)-iOpen(P_7,TimeFrame,1))/Point>=MinPips &&
(iClose(P_7,TimeFrame,1)-iOpen(P_7,TimeFrame,1))/Point>=(iHigh(P_7,TimeFrame,2)-iLow(P_7,TimeFrame,2))/Point*PipsStep)
{GoBuy_7=true;}
bool GoBuy_8 =false;
bool GoSell_8 =false;
if (iOpen(P_8,TimeFrame,1)>iClose(P_8,TimeFrame,1) && (iOpen(P_8,TimeFrame,1)-iClose(P_8,TimeFrame,1))/Point>=MinPips &&
(iOpen(P_8,TimeFrame,1)-iClose(P_8,TimeFrame,1))/Point>=(iHigh(P_8,TimeFrame,2)-iLow(P_8,TimeFrame,2))/Point*PipsStep)
{GoSell_8=true;}
if (iOpen(P_8,TimeFrame,1)<iClose(P_8,TimeFrame,1) && (iClose(P_8,TimeFrame,1)-iOpen(P_8,TimeFrame,1))/Point>=MinPips &&
(iClose(P_8,TimeFrame,1)-iOpen(P_8,TimeFrame,1))/Point>=(iHigh(P_8,TimeFrame,2)-iLow(P_8,TimeFrame,2))/Point*PipsStep)
{GoBuy_8=true;}
bool GoBuy_9 =false;
bool GoSell_9 =false;
if (iOpen(P_9,TimeFrame,1)>iClose(P_9,TimeFrame,1) && (iOpen(P_9,TimeFrame,1)-iClose(P_9,TimeFrame,1))/Point>=MinPips &&
(iOpen(P_9,TimeFrame,1)-iClose(P_9,TimeFrame,1))/Point>=(iHigh(P_9,TimeFrame,2)-iLow(P_9,TimeFrame,2))/Point*PipsStep)
{GoSell_9=true;}
if (iOpen(P_9,TimeFrame,1)<iClose(P_9,TimeFrame,1) && (iClose(P_9,TimeFrame,1)-iOpen(P_9,TimeFrame,1))/Point>=MinPips &&
(iClose(P_9,TimeFrame,1)-iOpen(P_9,TimeFrame,1))/Point>=(iHigh(P_9,TimeFrame,2)-iLow(P_9,TimeFrame,2))/Point*PipsStep)
{GoBuy_9=true;}
if(!ObjectGetInteger(0,"TRADEs_AU",OBJPROP_STATE) && TimeHour(TimeCurrent())>=TimeStart && TimeHour(TimeCurrent())<TimeEnd)
{
if(CountBar(-1,P_1)==0 && CountBarHist(-1,P_1)==0 &&
CountPair(-1,P_1,Magic)==0 && AccountFreeMarginCheck(P_1,OP_BUY,Lot_1)>0 && GoBuy_1)
{o=OrderSend(P_1,OP_BUY,Lot_1,MarketInfo(P_1,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountBar(-1,P_2)==0 && CountBarHist(-1,P_2)==0 &&
CountPair(-1,P_2,Magic)==0 && AccountFreeMarginCheck(P_2,OP_BUY,Lot_2)>0 && GoBuy_2)
{o=OrderSend(P_2,OP_BUY,Lot_2,MarketInfo(P_2,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountBar(-1,P_3)==0 && CountBarHist(-1,P_3)==0 &&
CountPair(-1,P_3,Magic)==0 && AccountFreeMarginCheck(P_3,OP_BUY,Lot_3)>0 && GoBuy_3)
{o=OrderSend(P_3,OP_BUY,Lot_3,MarketInfo(P_3,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountBar(-1,P_4)==0 && CountBarHist(-1,P_4)==0 &&
CountPair(-1,P_4,Magic)==0 && AccountFreeMarginCheck(P_4,OP_BUY,Lot_4)>0 && GoBuy_4)
{o=OrderSend(P_4,OP_BUY,Lot_4,MarketInfo(P_4,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountBar(-1,P_5)==0 && CountBarHist(-1,P_5)==0 &&
CountPair(-1,P_5,Magic)==0 && AccountFreeMarginCheck(P_5,OP_BUY,Lot_5)>0 && GoBuy_5)
{o=OrderSend(P_5,OP_BUY,Lot_5,MarketInfo(P_5,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountBar(-1,P_6)==0 && CountBarHist(-1,P_6)==0 &&
CountPair(-1,P_6,Magic)==0 && AccountFreeMarginCheck(P_6,OP_BUY,Lot_6)>0 && GoBuy_6)
{o=OrderSend(P_6,OP_BUY,Lot_6,MarketInfo(P_6,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountBar(-1,P_7)==0 && CountBarHist(-1,P_7)==0 &&
CountPair(-1,P_7,Magic)==0 && AccountFreeMarginCheck(P_7,OP_BUY,Lot_7)>0 && GoBuy_7)
{o=OrderSend(P_7,OP_BUY,Lot_7,MarketInfo(P_7,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountBar(-1,P_8)==0 && CountBarHist(-1,P_8)==0 &&
CountPair(-1,P_8,Magic)==0 && AccountFreeMarginCheck(P_8,OP_BUY,Lot_8)>0 && GoBuy_8)
{o=OrderSend(P_8,OP_BUY,Lot_8,MarketInfo(P_8,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountBar(-1,P_9)==0 && CountBarHist(-1,P_9)==0 &&
CountPair(-1,P_9,Magic)==0 && AccountFreeMarginCheck(P_9,OP_BUY,Lot_9)>0 && GoBuy_9)
{o=OrderSend(P_9,OP_BUY,Lot_9,MarketInfo(P_9,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountBar(-1,P_1)==0 && CountBarHist(-1,P_1)==0 &&
CountPair(-1,P_1,Magic)==0 && AccountFreeMarginCheck(P_1,OP_SELL,Lot_1)>0 && GoSell_1)
{o=OrderSend(P_1,OP_SELL,Lot_1,MarketInfo(P_1,MODE_BID),10,0,0,comment,Magic,0,Red);}
if(CountBar(-1,P_2)==0 && CountBarHist(-1,P_2)==0 &&
CountPair(-1,P_2,Magic)==0 && AccountFreeMarginCheck(P_2,OP_SELL,Lot_2)>0 && GoSell_2)
{o=OrderSend(P_2,OP_SELL,Lot_2,MarketInfo(P_2,MODE_BID),10,0,0,comment,Magic,0,Red);}
if(CountBar(-1,P_3)==0 && CountBarHist(-1,P_3)==0 &&
CountPair(-1,P_3,Magic)==0 && AccountFreeMarginCheck(P_3,OP_SELL,Lot_3)>0 && GoSell_3)
{o=OrderSend(P_3,OP_SELL,Lot_3,MarketInfo(P_3,MODE_BID),10,0,0,comment,Magic,0,Red);}
if(CountBar(-1,P_4)==0 && CountBarHist(-1,P_4)==0 &&
CountPair(-1,P_4,Magic)==0 && AccountFreeMarginCheck(P_4,OP_SELL,Lot_4)>0 && GoSell_4)
{o=OrderSend(P_4,OP_SELL,Lot_4,MarketInfo(P_4,MODE_BID),10,0,0,comment,Magic,0,Red);}
if(CountBar(-1,P_5)==0 && CountBarHist(-1,P_5)==0 &&
CountPair(-1,P_5,Magic)==0 && AccountFreeMarginCheck(P_5,OP_SELL,Lot_5)>0 && GoSell_5)
{o=OrderSend(P_5,OP_SELL,Lot_5,MarketInfo(P_5,MODE_BID),10,0,0,comment,Magic,0,Red);}
if(CountBar(-1,P_6)==0 && CountBarHist(-1,P_6)==0 &&
CountPair(-1,P_6,Magic)==0 && AccountFreeMarginCheck(P_6,OP_SELL,Lot_6)>0 && GoSell_6)
{o=OrderSend(P_6,OP_SELL,Lot_6,MarketInfo(P_6,MODE_BID),10,0,0,comment,Magic,0,Red);}
if(CountBar(-1,P_7)==0 && CountBarHist(-1,P_7)==0 &&
CountPair(-1,P_7,Magic)==0 && AccountFreeMarginCheck(P_7,OP_SELL,Lot_7)>0 && GoSell_7)
{o=OrderSend(P_7,OP_SELL,Lot_7,MarketInfo(P_7,MODE_BID),10,0,0,comment,Magic,0,Red);}
if(CountBar(-1,P_8)==0 && CountBarHist(-1,P_8)==0 &&
CountPair(-1,P_8,Magic)==0 && AccountFreeMarginCheck(P_8,OP_SELL,Lot_8)>0 && GoSell_8)
{o=OrderSend(P_8,OP_SELL,Lot_8,MarketInfo(P_8,MODE_BID),10,0,0,comment,Magic,0,Red);}
if(CountBar(-1,P_9)==0 && CountBarHist(-1,P_9)==0 &&
CountPair(-1,P_9,Magic)==0 && AccountFreeMarginCheck(P_9,OP_SELL,Lot_9)>0 && GoSell_9)
{o=OrderSend(P_9,OP_SELL,Lot_9,MarketInfo(P_9,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
if(CountAll(-1)<MaxOrders && TimeHour(TimeCurrent())>=TimeStart && TimeHour(TimeCurrent())<TimeEnd)
{
if(!ObjectGetInteger(0,"TRADEs_SM",OBJPROP_STATE))
{
if(CountBar(-1,P_1)==0 && CountBarHist(-1,P_1)==0 &&
CountPair(OP_BUY,P_1,Magic)>0 && AccountFreeMarginCheck(P_1,OP_BUY,Lot_1)>0 && GoBuy_1)
{if(CountPairPlus(OP_BUY,P_1,Magic)==0)
{if(MarketInfo(P_1,MODE_ASK)+pEURUSD_Step*MarketInfo(P_1,MODE_POINT)<=OldPricB(P_1,Magic))
{o=OrderSend(P_1,OP_BUY,Lot_1,MarketInfo(P_1,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
}
if(CountBar(-1,P_1)==0 && CountBarHist(-1,P_1)==0 &&
CountPair(OP_SELL,P_1,Magic)>0 && AccountFreeMarginCheck(P_1,OP_SELL,Lot_1)>0 && GoSell_1)
{if(CountPairPlus(OP_SELL,P_1,Magic)==0)
{if(MarketInfo(P_1,MODE_BID)-pEURUSD_Step*MarketInfo(P_1,MODE_POINT)>=OldPricS(P_1,Magic))
{o=OrderSend(P_1,OP_SELL,Lot_1,MarketInfo(P_1,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
if(CountBar(-1,P_2)==0 && CountBarHist(-1,P_2)==0 &&
CountPair(OP_BUY,P_2,Magic)>0 && AccountFreeMarginCheck(P_2,OP_BUY,Lot_2)>0 && GoBuy_2)
{if(CountPairPlus(OP_BUY,P_2,Magic)==0)
{if(MarketInfo(P_2,MODE_ASK)+pGBPUSD_Step*MarketInfo(P_2,MODE_POINT)<=OldPricB(P_2,Magic))
{o=OrderSend(P_2,OP_BUY,Lot_2,MarketInfo(P_2,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
}
if(CountBar(-1,P_2)==0 && CountBarHist(-1,P_2)==0 &&
CountPair(OP_SELL,P_2,Magic)>0 && AccountFreeMarginCheck(P_2,OP_SELL,Lot_2)>0 && GoSell_2)
{if(CountPairPlus(OP_SELL,P_2,Magic)==0)
{if(MarketInfo(P_2,MODE_BID)-pGBPUSD_Step*MarketInfo(P_2,MODE_POINT)>=OldPricS(P_2,Magic))
{o=OrderSend(P_2,OP_SELL,Lot_2,MarketInfo(P_2,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
if(CountBar(-1,P_3)==0 && CountBarHist(-1,P_3)==0 &&
CountPair(OP_BUY,P_3,Magic)>0 && AccountFreeMarginCheck(P_3,OP_BUY,Lot_3)>0 && GoBuy_3)
{if(CountPairPlus(OP_BUY,P_3,Magic)==0)
{if(MarketInfo(P_3,MODE_ASK)+pAUDUSD_Step*MarketInfo(P_3,MODE_POINT)<=OldPricB(P_3,Magic))
{o=OrderSend(P_3,OP_BUY,Lot_3,MarketInfo(P_3,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
}
if(CountBar(-1,P_3)==0 && CountBarHist(-1,P_3)==0 &&
CountPair(OP_SELL,P_3,Magic)>0 && AccountFreeMarginCheck(P_3,OP_SELL,Lot_3)>0 && GoSell_3)
{if(CountPairPlus(OP_SELL,P_3,Magic)==0)
{if(MarketInfo(P_3,MODE_BID)-pAUDUSD_Step*MarketInfo(P_3,MODE_POINT)>=OldPricS(P_3,Magic))
{o=OrderSend(P_3,OP_SELL,Lot_3,MarketInfo(P_3,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
if(CountBar(-1,P_4)==0 && CountBarHist(-1,P_4)==0 &&
CountPair(OP_BUY,P_4,Magic)>0 && AccountFreeMarginCheck(P_4,OP_BUY,Lot_4)>0 && GoBuy_4)
{if(CountPairPlus(OP_BUY,P_4,Magic)==0)
{if(MarketInfo(P_4,MODE_ASK)+pNZDUSD_Step*MarketInfo(P_4,MODE_POINT)<=OldPricB(P_4,Magic))
{o=OrderSend(P_4,OP_BUY,Lot_4,MarketInfo(P_4,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
}
if(CountBar(-1,P_4)==0 && CountBarHist(-1,P_4)==0 &&
CountPair(OP_SELL,P_4,Magic)>0 && AccountFreeMarginCheck(P_4,OP_SELL,Lot_4)>0 && GoSell_4)
{if(CountPairPlus(OP_SELL,P_4,Magic)==0)
{if(MarketInfo(P_4,MODE_BID)-pNZDUSD_Step*MarketInfo(P_4,MODE_POINT)>=OldPricS(P_4,Magic))
{o=OrderSend(P_4,OP_SELL,Lot_4,MarketInfo(P_4,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
if(CountBar(-1,P_5)==0 && CountBarHist(-1,P_5)==0 &&
CountPair(OP_BUY,P_5,Magic)>0 && AccountFreeMarginCheck(P_5,OP_BUY,Lot_5)>0 && GoBuy_5)
{if(CountPairPlus(OP_BUY,P_5,Magic)==0)
{if(MarketInfo(P_5,MODE_ASK)+pUSDJPY_Step*MarketInfo(P_5,MODE_POINT)<=OldPricB(P_5,Magic))
{o=OrderSend(P_5,OP_BUY,Lot_5,MarketInfo(P_5,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
}
if(CountBar(-1,P_5)==0 && CountBarHist(-1,P_5)==0 &&
CountPair(OP_SELL,P_5,Magic)>0 && AccountFreeMarginCheck(P_5,OP_SELL,Lot_5)>0 && GoSell_5)
{if(CountPairPlus(OP_SELL,P_5,Magic)==0)
{if(MarketInfo(P_5,MODE_BID)-pUSDJPY_Step*MarketInfo(P_5,MODE_POINT)>=OldPricS(P_5,Magic))
{o=OrderSend(P_5,OP_SELL,Lot_5,MarketInfo(P_5,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
if(CountBar(-1,P_6)==0 && CountBarHist(-1,P_6)==0 &&
CountPair(OP_BUY,P_6,Magic)>0 && AccountFreeMarginCheck(P_6,OP_BUY,Lot_6)>0 && GoBuy_6)
{if(CountPairPlus(OP_BUY,P_6,Magic)==0)
{if(MarketInfo(P_6,MODE_ASK)+pUSDCAD_Step*MarketInfo(P_6,MODE_POINT)<=OldPricB(P_6,Magic))
{o=OrderSend(P_6,OP_BUY,Lot_6,MarketInfo(P_6,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
}
if(CountBar(-1,P_6)==0 && CountBarHist(-1,P_6)==0 &&
CountPair(OP_SELL,P_6,Magic)>0 && AccountFreeMarginCheck(P_6,OP_SELL,Lot_6)>0 && GoSell_6)
{if(CountPairPlus(OP_SELL,P_6,Magic)==0)
{if(MarketInfo(P_6,MODE_BID)-pUSDCAD_Step*MarketInfo(P_6,MODE_POINT)>=OldPricS(P_6,Magic))
{o=OrderSend(P_6,OP_SELL,Lot_6,MarketInfo(P_6,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
if(CountBar(-1,P_7)==0 && CountBarHist(-1,P_7)==0 &&
CountPair(OP_BUY,P_7,Magic)>0 && AccountFreeMarginCheck(P_7,OP_BUY,Lot_7)>0 && GoBuy_7)
{if(CountPairPlus(OP_BUY,P_7,Magic)==0)
{if(MarketInfo(P_7,MODE_ASK)+pUSDCHF_Step*MarketInfo(P_7,MODE_POINT)<=OldPricB(P_7,Magic))
{o=OrderSend(P_7,OP_BUY,Lot_7,MarketInfo(P_7,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
}
if(CountBar(-1,P_7)==0 && CountBarHist(-1,P_7)==0 &&
CountPair(OP_SELL,P_7,Magic)>0 && AccountFreeMarginCheck(P_7,OP_SELL,Lot_7)>0 && GoSell_7)
{if(CountPairPlus(OP_SELL,P_7,Magic)==0)
{if(MarketInfo(P_7,MODE_BID)-pUSDCHF_Step*MarketInfo(P_7,MODE_POINT)>=OldPricS(P_7,Magic))
{o=OrderSend(P_7,OP_SELL,Lot_7,MarketInfo(P_7,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
if(CountBar(-1,P_8)==0 && CountBarHist(-1,P_8)==0 &&
CountPair(OP_BUY,P_8,Magic)>0 && AccountFreeMarginCheck(P_8,OP_BUY,Lot_8)>0 && GoBuy_8)
{if(CountPairPlus(OP_BUY,P_8,Magic)==0)
{if(MarketInfo(P_8,MODE_ASK)+pEURJPY_Step*MarketInfo(P_8,MODE_POINT)<=OldPricB(P_8,Magic))
{o=OrderSend(P_8,OP_BUY,Lot_8,MarketInfo(P_8,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
}
if(CountBar(-1,P_8)==0 && CountBarHist(-1,P_8)==0 &&
CountPair(OP_SELL,P_8,Magic)>0 && AccountFreeMarginCheck(P_8,OP_SELL,Lot_8)>0 && GoSell_8)
{if(CountPairPlus(OP_SELL,P_8,Magic)==0)
{if(MarketInfo(P_8,MODE_BID)-pEURJPY_Step*MarketInfo(P_8,MODE_POINT)>=OldPricS(P_8,Magic))
{o=OrderSend(P_8,OP_SELL,Lot_8,MarketInfo(P_8,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
if(CountBar(-1,P_9)==0 && CountBarHist(-1,P_9)==0 &&
CountPair(OP_BUY,P_9,Magic)>0 && AccountFreeMarginCheck(P_9,OP_BUY,Lot_9)>0 && GoBuy_9)
{if(CountPairPlus(OP_BUY,P_9,Magic)==0)
{if(MarketInfo(P_9,MODE_ASK)+pGBPJPY_Step*MarketInfo(P_9,MODE_POINT)<=OldPricB(P_9,Magic))
{o=OrderSend(P_9,OP_BUY,Lot_9,MarketInfo(P_9,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
}
if(CountBar(-1,P_9)==0 && CountBarHist(-1,P_9)==0 &&
CountPair(OP_SELL,P_9,Magic)>0 && AccountFreeMarginCheck(P_9,OP_SELL,Lot_9)>0 && GoSell_9)
{if(CountPairPlus(OP_SELL,P_9,Magic)==0)
{if(MarketInfo(P_9,MODE_BID)-pGBPJPY_Step*MarketInfo(P_9,MODE_POINT)>=OldPricS(P_9,Magic))
{o=OrderSend(P_9,OP_SELL,Lot_9,MarketInfo(P_9,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
}
if(!ObjectGetInteger(0,"TRADEs_SP",OBJPROP_STATE))
{
if(CountBar(-1,P_1)==0 && CountBarHist(-1,P_1)==0 &&
CountPair(OP_BUY,P_1,Magic)>0 && AccountFreeMarginCheck(P_1,OP_BUY,Lot_1)>0 && GoBuy_1)
{if(MarketInfo(P_1,MODE_ASK)-pEURUSD_Step*MarketInfo(P_1,MODE_POINT)>=OldPricB(P_1,Magic))
{o=OrderSend(P_1,OP_BUY,Lot_1,MarketInfo(P_1,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
if(CountBar(-1,P_1)==0 && CountBarHist(-1,P_1)==0 &&
CountPair(OP_SELL,P_1,Magic)>0 && AccountFreeMarginCheck(P_1,OP_SELL,Lot_1)>0 && GoSell_1)
{if(MarketInfo(P_1,MODE_BID)+pEURUSD_Step*MarketInfo(P_1,MODE_POINT)<=OldPricS(P_1,Magic))
{o=OrderSend(P_1,OP_SELL,Lot_1,MarketInfo(P_1,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
if(CountBar(-1,P_2)==0 && CountBarHist(-1,P_2)==0 &&
CountPair(OP_BUY,P_2,Magic)>0 && AccountFreeMarginCheck(P_2,OP_BUY,Lot_2)>0 && GoBuy_2)
{if(MarketInfo(P_2,MODE_ASK)-pGBPUSD_Step*MarketInfo(P_2,MODE_POINT)>=OldPricB(P_2,Magic))
{o=OrderSend(P_2,OP_BUY,Lot_2,MarketInfo(P_2,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
if(CountBar(-1,P_2)==0 && CountBarHist(-1,P_2)==0 &&
CountPair(OP_SELL,P_2,Magic)>0 && AccountFreeMarginCheck(P_2,OP_SELL,Lot_2)>0 && GoSell_2)
{if(MarketInfo(P_2,MODE_BID)+pGBPUSD_Step*MarketInfo(P_2,MODE_POINT)<=OldPricS(P_2,Magic))
{o=OrderSend(P_2,OP_SELL,Lot_2,MarketInfo(P_2,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
if(CountBar(-1,P_3)==0 && CountBarHist(-1,P_3)==0 &&
CountPair(OP_BUY,P_3,Magic)>0 && AccountFreeMarginCheck(P_3,OP_BUY,Lot_3)>0 && GoBuy_3)
{if(MarketInfo(P_3,MODE_ASK)-pAUDUSD_Step*MarketInfo(P_3,MODE_POINT)>=OldPricB(P_3,Magic))
{o=OrderSend(P_3,OP_BUY,Lot_3,MarketInfo(P_3,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
if(CountBar(-1,P_3)==0 && CountBarHist(-1,P_3)==0 &&
CountPair(OP_SELL,P_3,Magic)>0 && AccountFreeMarginCheck(P_3,OP_SELL,Lot_3)>0 && GoSell_3)
{if(MarketInfo(P_3,MODE_BID)+pAUDUSD_Step*MarketInfo(P_3,MODE_POINT)<=OldPricS(P_3,Magic))
{o=OrderSend(P_3,OP_SELL,Lot_3,MarketInfo(P_3,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
if(CountBar(-1,P_4)==0 && CountBarHist(-1,P_4)==0 &&
CountPair(OP_BUY,P_4,Magic)>0 && AccountFreeMarginCheck(P_4,OP_BUY,Lot_4)>0 && GoBuy_4)
{if(MarketInfo(P_4,MODE_ASK)-pNZDUSD_Step*MarketInfo(P_4,MODE_POINT)>=OldPricB(P_4,Magic))
{o=OrderSend(P_4,OP_BUY,Lot_4,MarketInfo(P_4,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
if(CountBar(-1,P_4)==0 && CountBarHist(-1,P_4)==0 &&
CountPair(OP_SELL,P_4,Magic)>0 && AccountFreeMarginCheck(P_4,OP_SELL,Lot_4)>0 && GoSell_4)
{if(MarketInfo(P_4,MODE_BID)+pNZDUSD_Step*MarketInfo(P_4,MODE_POINT)<=OldPricS(P_4,Magic))
{o=OrderSend(P_4,OP_SELL,Lot_4,MarketInfo(P_4,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
if(CountBar(-1,P_5)==0 && CountBarHist(-1,P_5)==0 &&
CountPair(OP_BUY,P_5,Magic)>0 && AccountFreeMarginCheck(P_5,OP_BUY,Lot_5)>0 && GoBuy_5)
{if(MarketInfo(P_5,MODE_ASK)-pUSDJPY_Step*MarketInfo(P_5,MODE_POINT)>=OldPricB(P_5,Magic))
{o=OrderSend(P_5,OP_BUY,Lot_5,MarketInfo(P_5,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
if(CountBar(-1,P_5)==0 && CountBarHist(-1,P_5)==0 &&
CountPair(OP_SELL,P_5,Magic)>0 && AccountFreeMarginCheck(P_5,OP_SELL,Lot_5)>0 && GoSell_5)
{if(MarketInfo(P_5,MODE_BID)+pUSDJPY_Step*MarketInfo(P_5,MODE_POINT)<=OldPricS(P_5,Magic))
{o=OrderSend(P_5,OP_SELL,Lot_5,MarketInfo(P_5,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
if(CountBar(-1,P_6)==0 && CountBarHist(-1,P_6)==0 &&
CountPair(OP_BUY,P_6,Magic)>0 && AccountFreeMarginCheck(P_6,OP_BUY,Lot_6)>0 && GoBuy_6)
{if(MarketInfo(P_6,MODE_ASK)-pUSDCAD_Step*MarketInfo(P_6,MODE_POINT)>=OldPricB(P_6,Magic))
{o=OrderSend(P_6,OP_BUY,Lot_6,MarketInfo(P_6,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
if(CountBar(-1,P_6)==0 && CountBarHist(-1,P_6)==0 &&
CountPair(OP_SELL,P_6,Magic)>0 && AccountFreeMarginCheck(P_6,OP_SELL,Lot_6)>0 && GoSell_6)
{if(MarketInfo(P_6,MODE_BID)+pUSDCAD_Step*MarketInfo(P_6,MODE_POINT)<=OldPricS(P_6,Magic))
{o=OrderSend(P_6,OP_SELL,Lot_6,MarketInfo(P_6,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
if(CountBar(-1,P_7)==0 && CountBarHist(-1,P_7)==0 &&
CountPair(OP_BUY,P_7,Magic)>0 && AccountFreeMarginCheck(P_7,OP_BUY,Lot_7)>0 && GoBuy_7)
{if(MarketInfo(P_7,MODE_ASK)-pUSDCHF_Step*MarketInfo(P_7,MODE_POINT)>=OldPricB(P_7,Magic))
{o=OrderSend(P_7,OP_BUY,Lot_7,MarketInfo(P_7,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
if(CountBar(-1,P_7)==0 && CountBarHist(-1,P_7)==0 &&
CountPair(OP_SELL,P_7,Magic)>0 && AccountFreeMarginCheck(P_7,OP_SELL,Lot_7)>0 && GoSell_7)
{if(MarketInfo(P_7,MODE_BID)+pUSDCHF_Step*MarketInfo(P_7,MODE_POINT)<=OldPricS(P_7,Magic))
{o=OrderSend(P_7,OP_SELL,Lot_7,MarketInfo(P_7,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
if(CountBar(-1,P_8)==0 && CountBarHist(-1,P_8)==0 &&
CountPair(OP_BUY,P_8,Magic)>0 && AccountFreeMarginCheck(P_8,OP_BUY,Lot_8)>0 && GoBuy_8)
{if(MarketInfo(P_8,MODE_ASK)-pEURJPY_Step*MarketInfo(P_8,MODE_POINT)>=OldPricB(P_8,Magic))
{o=OrderSend(P_8,OP_BUY,Lot_8,MarketInfo(P_8,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
if(CountBar(-1,P_8)==0 && CountBarHist(-1,P_8)==0 &&
CountPair(OP_SELL,P_8,Magic)>0 && AccountFreeMarginCheck(P_8,OP_SELL,Lot_8)>0 && GoSell_8)
{if(MarketInfo(P_8,MODE_BID)+pEURJPY_Step*MarketInfo(P_8,MODE_POINT)<=OldPricS(P_8,Magic))
{o=OrderSend(P_8,OP_SELL,Lot_8,MarketInfo(P_8,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
if(CountBar(-1,P_9)==0 && CountBarHist(-1,P_9)==0 &&
CountPair(OP_BUY,P_9,Magic)>0 && AccountFreeMarginCheck(P_9,OP_BUY,Lot_9)>0 && GoBuy_9)
{if(MarketInfo(P_9,MODE_ASK)-pGBPJPY_Step*MarketInfo(P_9,MODE_POINT)>=OldPricB(P_9,Magic))
{o=OrderSend(P_9,OP_BUY,Lot_9,MarketInfo(P_9,MODE_ASK),10,0,0,comment,Magic,0,Green);}
}
if(CountBar(-1,P_9)==0 && CountBarHist(-1,P_9)==0 &&
CountPair(OP_SELL,P_9,Magic)>0 && AccountFreeMarginCheck(P_9,OP_SELL,Lot_9)>0 && GoSell_9)
{if(MarketInfo(P_9,MODE_BID)+pGBPJPY_Step*MarketInfo(P_9,MODE_POINT)<=OldPricS(P_9,Magic))
{o=OrderSend(P_9,OP_SELL,Lot_9,MarketInfo(P_9,MODE_BID),10,0,0,comment,Magic,0,Red);}
}
}
}
int op_1=0;
int op_2=0;
int op_3=0;
int op_4=0;
int op_5=0;
int op_6=0;
int op_7=0;
int op_8=0;
int op_9=0;
if(CountPair(-1,P_1,Magic)>0) {op_1=1;}
if(CountPair(-1,P_2,Magic)>0) {op_2=1;}
if(CountPair(-1,P_3,Magic)>0) {op_3=1;}
if(CountPair(-1,P_4,Magic)>0) {op_4=1;}
if(CountPair(-1,P_5,Magic)>0) {op_5=1;}
if(CountPair(-1,P_6,Magic)>0) {op_6=1;}
if(CountPair(-1,P_7,Magic)>0) {op_7=1;}
if(CountPair(-1,P_8,Magic)>0) {op_8=1;}
if(CountPair(-1,P_9,Magic)>0) {op_9=1;}
if(!ObjectGetInteger(0,"TRADEs_AU",OBJPROP_STATE))
{
double ProfProc=AllLots(-1)*ProfitPips;
if(ProfitAll(-1)>=ProfProc && ProfProc!=0)
{
ClosePos();
ObjectsDeleteAll(0,OBJ_ARROW);
ObjectsDeleteAll(0,OBJ_TREND);
}
}
if(ObjectGetInteger(0,"TRADEs_CN",OBJPROP_STATE))
{
if(TimeClose==0 && TimeHour(TimeCurrent())==TimeEnd)
{ClosePlusPair(P_1);
ClosePlusPair(P_2);
ClosePlusPair(P_3);
ClosePlusPair(P_4);
ClosePlusPair(P_5);
ClosePlusPair(P_6);
ClosePlusPair(P_7);
ClosePlusPair(P_8);
ClosePlusPair(P_9);
TimeClose=1;}
if(TimeClose==1 && TimeHour(TimeCurrent())>=TimeStart && TimeHour(TimeCurrent())<TimeEnd)
{TimeClose=0;}
}
if(ObjectGetInteger(0,"TRADEs_MO",OBJPROP_STATE))
{
if(CountPair(-1,P_1,Magic)==0 && CountPair(OP_BUY,P_1,0)>0)
{o=OrderSend(P_1,OP_BUY,Lot_1,MarketInfo(P_1,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_1,Magic)==0 && CountPair(OP_SELL,P_1,0)>0)
{o=OrderSend(P_1,OP_SELL,Lot_1,MarketInfo(P_1,MODE_BID),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_2,Magic)==0 && CountPair(OP_BUY,P_2,0)>0)
{o=OrderSend(P_2,OP_BUY,Lot_1,MarketInfo(P_2,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_2,Magic)==0 && CountPair(OP_SELL,P_2,0)>0)
{o=OrderSend(P_2,OP_SELL,Lot_1,MarketInfo(P_2,MODE_BID),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_3,Magic)==0 && CountPair(OP_BUY,P_3,0)>0)
{o=OrderSend(P_3,OP_BUY,Lot_1,MarketInfo(P_3,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_3,Magic)==0 && CountPair(OP_SELL,P_3,0)>0)
{o=OrderSend(P_3,OP_SELL,Lot_1,MarketInfo(P_3,MODE_BID),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_4,Magic)==0 && CountPair(OP_BUY,P_4,0)>0)
{o=OrderSend(P_4,OP_BUY,Lot_1,MarketInfo(P_4,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_4,Magic)==0 && CountPair(OP_SELL,P_4,0)>0)
{o=OrderSend(P_4,OP_SELL,Lot_1,MarketInfo(P_4,MODE_BID),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_5,Magic)==0 && CountPair(OP_BUY,P_5,0)>0)
{o=OrderSend(P_5,OP_BUY,Lot_1,MarketInfo(P_5,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_5,Magic)==0 && CountPair(OP_SELL,P_5,0)>0)
{o=OrderSend(P_5,OP_SELL,Lot_1,MarketInfo(P_5,MODE_BID),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_6,Magic)==0 && CountPair(OP_BUY,P_6,0)>0)
{o=OrderSend(P_6,OP_BUY,Lot_1,MarketInfo(P_6,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_6,Magic)==0 && CountPair(OP_SELL,P_6,0)>0)
{o=OrderSend(P_6,OP_SELL,Lot_1,MarketInfo(P_6,MODE_BID),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_7,Magic)==0 && CountPair(OP_BUY,P_7,0)>0)
{o=OrderSend(P_7,OP_BUY,Lot_1,MarketInfo(P_7,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_7,Magic)==0 && CountPair(OP_SELL,P_7,0)>0)
{o=OrderSend(P_7,OP_SELL,Lot_1,MarketInfo(P_7,MODE_BID),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_8,Magic)==0 && CountPair(OP_BUY,P_8,0)>0)
{o=OrderSend(P_8,OP_BUY,Lot_1,MarketInfo(P_8,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_8,Magic)==0 && CountPair(OP_SELL,P_8,0)>0)
{o=OrderSend(P_8,OP_SELL,Lot_1,MarketInfo(P_8,MODE_BID),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_9,Magic)==0 && CountPair(OP_BUY,P_9,0)>0)
{o=OrderSend(P_9,OP_BUY,Lot_1,MarketInfo(P_9,MODE_ASK),10,0,0,comment,Magic,0,Green);}
if(CountPair(-1,P_9,Magic)==0 && CountPair(OP_SELL,P_9,0)>0)
{o=OrderSend(P_9,OP_SELL,Lot_1,MarketInfo(P_9,MODE_BID),10,0,0,comment,Magic,0,Green);}
if((CountPair(OP_BUY,P_1,Magic)>0 && CountPair(OP_SELL,P_1,0)>0) || (CountPair(OP_SELL,P_1,Magic)>0 && CountPair(OP_BUY,P_1,0)>0))
{ClosePosPair(P_1,Magic);
ClosePosPair(P_1,0);}
if((CountPair(OP_BUY,P_2,Magic)>0 && CountPair(OP_SELL,P_2,0)>0) || (CountPair(OP_SELL,P_2,Magic)>0 && CountPair(OP_BUY,P_2,0)>0))
{ClosePosPair(P_2,Magic);
ClosePosPair(P_2,0);}
if((CountPair(OP_BUY,P_3,Magic)>0 && CountPair(OP_SELL,P_3,0)>0) || (CountPair(OP_SELL,P_3,Magic)>0 && CountPair(OP_BUY,P_3,0)>0))
{ClosePosPair(P_3,Magic);
ClosePosPair(P_3,0);}
if((CountPair(OP_BUY,P_4,Magic)>0 && CountPair(OP_SELL,P_4,0)>0) || (CountPair(OP_SELL,P_4,Magic)>0 && CountPair(OP_BUY,P_4,0)>0))
{ClosePosPair(P_4,Magic);
ClosePosPair(P_4,0);}
if((CountPair(OP_BUY,P_5,Magic)>0 && CountPair(OP_SELL,P_5,0)>0) || (CountPair(OP_SELL,P_5,Magic)>0 && CountPair(OP_BUY,P_5,0)>0))
{ClosePosPair(P_5,Magic);
ClosePosPair(P_5,0);}
if((CountPair(OP_BUY,P_6,Magic)>0 && CountPair(OP_SELL,P_6,0)>0) || (CountPair(OP_SELL,P_6,Magic)>0 && CountPair(OP_BUY,P_6,0)>0))
{ClosePosPair(P_6,Magic);
ClosePosPair(P_6,0);}
if((CountPair(OP_BUY,P_7,Magic)>0 && CountPair(OP_SELL,P_7,0)>0) || (CountPair(OP_SELL,P_7,Magic)>0 && CountPair(OP_BUY,P_7,0)>0))
{ClosePosPair(P_7,Magic);
ClosePosPair(P_7,0);}
if((CountPair(OP_BUY,P_8,Magic)>0 && CountPair(OP_SELL,P_8,0)>0) || (CountPair(OP_SELL,P_8,Magic)>0 && CountPair(OP_BUY,P_8,0)>0))
{ClosePosPair(P_8,Magic);
ClosePosPair(P_8,0);}
if((CountPair(OP_BUY,P_9,Magic)>0 && CountPair(OP_SELL,P_9,0)>0) || (CountPair(OP_SELL,P_9,Magic)>0 && CountPair(OP_BUY,P_9,0)>0))
{ClosePosPair(P_9,Magic);
ClosePosPair(P_9,0);}
if(CountPair(-1,MobClosPair,0)>0)
{ClosePos(Magic);
ClosePosPair(MobClosPair,0);}
}
double LossProc=(AccountBalance()/100)*StopLossProcent*(-1);
if(ProfitAll(-1)<LossProc && LossProc!=0)
{
ClosePos(Magic);
ObjectsDeleteAll(0,OBJ_ARROW);
ObjectsDeleteAll(0,OBJ_TREND);
}
if(!ObjectGetInteger(0,"TRADEs_P1",OBJPROP_STATE) &&
!ObjectGetInteger(0,"TRADEs_P2",OBJPROP_STATE) &&
!ObjectGetInteger(0,"TRADEs_P3",OBJPROP_STATE) &&
!ObjectGetInteger(0,"TRADEs_P4",OBJPROP_STATE) &&
!ObjectGetInteger(0,"TRADEs_P5",OBJPROP_STATE) &&
!ObjectGetInteger(0,"TRADEs_P6",OBJPROP_STATE) &&
!ObjectGetInteger(0,"TRADEs_P7",OBJPROP_STATE) &&
!ObjectGetInteger(0,"TRADEs_P8",OBJPROP_STATE) &&
!ObjectGetInteger(0,"TRADEs_P9",OBJPROP_STATE))
{PairName=Symbol();}
if(ObjectGetInteger(0,"TRADEs_P1",OBJPROP_STATE))
{PairName=P_1;}
if(ObjectGetInteger(0,"TRADEs_P2",OBJPROP_STATE))
{PairName=P_2;}
if(ObjectGetInteger(0,"TRADEs_P3",OBJPROP_STATE))
{PairName=P_3;}
if(ObjectGetInteger(0,"TRADEs_P4",OBJPROP_STATE))
{PairName=P_4;}
if(ObjectGetInteger(0,"TRADEs_P5",OBJPROP_STATE))
{PairName=P_5;}
if(ObjectGetInteger(0,"TRADEs_P6",OBJPROP_STATE))
{PairName=P_6;}
if(ObjectGetInteger(0,"TRADEs_P7",OBJPROP_STATE))
{PairName=P_7;}
if(ObjectGetInteger(0,"TRADEs_P8",OBJPROP_STATE))
{PairName=P_8;}
if(ObjectGetInteger(0,"TRADEs_P9",OBJPROP_STATE))
{PairName=P_9;}
if(Languale==0)
{TextOn="Вкл";
TextOff="Выкл";}
if(Languale==1)
{TextOn="On";
TextOff="Off";}
if(!ObjectGetInteger(0,"INFO_Button",OBJPROP_STATE))
{
if(Languale==0)
{
RectLabelCreate("INFO_fon",240,20,220,385,FonColor,1);
PutButton("INFO_Button",70,15,"INFO",1);
PutLabelT("INFO_LOGO",235,24,"WWW.MFOREX.PRO",1);
PutLabelT("INFO_Line",235,27,"______________________________",1);
PutLabelDt("INFO_txt1",235,45,"Информация о счете",1);
PutLabelT("INFO_Line2",235,47,"______________________________",1);
PutLabelT("INFO_txt2",235,65,"Баланс:",1);
PutLabelT("INFO_txt3",235,80,"Средства:",1);
PutLabelT("INFO_txt4",2Показано первые 50% кода (символов: 72750)
Открыть по тарифу
Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.
Разовая покупка файла
На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.
Зачем нужен email? После подтверждения оплаты файл сохранится в кабинете на этот email. Если аккаунта ещё нет, мы создадим его и пришлём ссылку для задания пароля. Если аккаунт уже есть, покупка добавится в него. Укажите адрес, к которому у вас есть доступ.
Чтобы оформить заказ, введите email и перейдите к оплате.