sniperea-v3.11_uni.mq4
Похожие материалы по тегам
Сообщите нам, если считаете, что материал размещён без разрешения.
Сообщить о материале
Обращение по товару «sniperea-v3.11_uni.mq4» отправится на рассмотрение. Укажите контакт для ответа и опишите причину.
О программе
Данный код представляет собой торгового советника для платформы MetaTrader 4, написанный на языке MQL4. Советник использует пользовательские индикаторы серии Sniper (Sniper, Sniper Stop_v2, Sniper Trend A, Sniper Trend B) для формирования сигналов на покупку и продажу. Он управляет позициями с помощью стандартных торговых функций MetaTrader, включая установку стоп-лоссов, тейк-профитов, трейлинг-стопов и безубытка.
Настройки программы
| Настройка | Описание |
|---|---|
| comment to display in the order (comment) | Комментарий к ордеру — Текстовый комментарий, отображаемый в названии открытого ордера. |
| IndicatorName | Имя индикатора — Название используемого пользовательского индикатора стрелок для формирования сигналов. |
| BuyBuffer | Буфер покупки — Индекс буфера данных индикатора, соответствующий сигналу на покупку. |
| SellBuffer | Буфер продажи — Индекс буфера данных индикатора, соответствующий сигналу на продажу. |
| magic number required if you use different settings on a same pair, same timeframe (magic) | Магический номер — Уникальный идентификатор ордеров советника, необходимый для различения настроек на одном инструменте и таймфрейме. |
| moneymanagement | Управление деньгами — Разделитель группы настроек управления размером лота и рисками. |
| lots size (lots) | Размер лота — Фиксированный размер лота для открытия сделок. |
| enable risk management (lotsoptimized) | Оптимизация лота — Включает расчёт размера лота на основе риска и баланса счёта. |
| risk in percentage of the account (risk) | Риск — Процент от баланса счёта, используемый для расчёта размера лота при включённой оптимизации. |
| minimum lot allowed by the expert (minlot) | Минимальный лот — Минимально допустимый размер лота, устанавливаемый советником. |
| maximum lot allowed by the expert (maxlot) | Максимальный лот — Максимально допустимый размер лота, устанавливаемый советником. |
| 1 for minilot, 2 for microlot (lotdigits) | Точность лота — Количество знаков после запятой для нормировки размера лота. |
| ordersmanagement | Управление ордерами — Разделитель группы настроек управления открытыми позициями. |
| close the orders on an opposite signal (oppositeclose) | Закрытие при противоположном сигнале — Закрывает позицию при появлении сигнала в противоположном направлении. |
| reverse the signals, long if short, short if long (reversesignals) | Инверсия сигналов — Инвертирует направление сделки: при сигнале на покупку открывается продажа и наоборот. |
| maximum trades allowed by the traders (maxtrades) | Максимум сделок — Максимальное количество одновременно открытых сделок. |
| maximum trades per bar allowed by the expert (tradesperbar) | Сделок на бар — Максимальное количество сделок, открываемых за один бар. |
| long stop loss (lstoploss) | Стоп-лосс для лонга — Размер стоп-лосса в пунктах для позиции на покупку. |
| short stop loss (sstoploss) | Стоп-лосс для шорта — Размер стоп-лосса в пунктах для позиции на продажу. |
| long take profit (ltakeprofit) | Тейк-профит для лонга 1 — Уровень фиксации прибыли в пунктах для позиции на покупку. |
| long take profit 2 (ltakeprofit2) | Тейк-профит для лонга 2 — Второй уровень фиксации прибыли для позиции на покупку. |
| long take profit 3 (ltakeprofit3) | Тейк-профит для лонга 3 — Третий уровень фиксации прибыли для позиции на покупку. |
| long take profit 4 (ltakeprofit4) | Тейк-профит для лонга 4 — Четвёртый уровень фиксации прибыли для позиции на покупку. |
| long take profit 5 (ltakeprofit5) | Тейк-профит для лонга 5 — Пятый уровень фиксации прибыли для позиции на покупку. |
| short take profit (stakeprofit) | Тейк-профит для шорта 1 — Уровень фиксации прибыли в пунктах для позиции на продажу. |
| short take profit 2 (stakeprofit2) | Тейк-профит для шорта 2 — Второй уровень фиксации прибыли для позиции на продажу. |
| short take profit 3 (stakeprofit3) | Тейк-профит для шорта 3 — Третий уровень фиксации прибыли для позиции на продажу. |
| short take profit 4 (stakeprofit4) | Тейк-профит для шорта 4 — Четвёртый уровень фиксации прибыли для позиции на продажу. |
| short take profit 5 (stakeprofit5) | Тейк-профит для шорта 5 — Пятый уровень фиксации прибыли для позиции на продажу. |
| profit in pips required to enable the trailing stop (trailingstart) | Начало трейлинга — Прибыль в пунктах, при достижении которой активируется трейлинг-стоп. |
| trailing stop (trailingstop) | Трейлинг-стоп — Расстояние в пунктах от текущей цены для трейлинг-стопа. |
| margin allowed to the market to enable the trailing stop (trailingstep) | Шаг трейлинга — Минимальное смещение трейлинг-стопа при его перемещении. |
| gain in pips required to enable the break even (breakevengain) | Прибыль для безубытка — Прибыль в пунктах, при достижении которой активируется перевод стоп-лосса в безубыток. |
| break even (breakeven) | Безубыток — Расстояние в пунктах от цены входа для установки стоп-лосса в режиме безубытка. |
| advordersmanagement | Расширенное управление ордерами — Разделитель группы расширенных настроек управления ордерами. |
| true=open five orders as per the rule with different sl and tp, false=open one order with buystop (s (open5orders) | Пять ордеров — При включении открываются пять ордеров с разными уровнями стоп-лосса и тейк-профита; при выключении — один ордер. |
| true=close the orders if all conditions are not met anymore, false=don't close the orders if all con (closeonbadconditio | Закрытие при плохих условиях — Закрывает позиции, если все условия для сделки более не выполняются. |
| true=we exit on arrows (closeonarrows) | Закрытие по стрелкам — Закрывает позиции при появлении стрелочных сигналов индикатора. |
| true=stoploss based on the sniper stopv2, false=stoploss not based on the sniper stop v2 (autostop) | Автостоп — Использует значение индикатора Sniper Stop_v2 для автоматической установки стоп-лосса. |
| margin to add to the autostop, positive value=value to add, negative value=value to withdraw (autostopmargin) | Отступ автостопа — Дополнительное значение в пунктах, добавляемое или вычитаемое из уровня автостопа. |
| minimum stop loss when autostop is enabled (minimumstop) | Минимальный стоп — Минимально допустимый размер стоп-лосса при включённом автостопе. |
| maximum stop loss when autostop is enabled (maximumstop) | Максимальный стоп — Максимально допустимый размер стоп-лосса при включённом автостопе. |
| true=don't trade if the distance between the price and the sniper stop v2 is higher thanmaximumstop, (notradeovermaxstop | Нет торговли при превышении максимального стопа — Запрещает открытие сделок, если расстояние до уровня автостопа превышает максимальный стоп. |
| true=trailing stop based on the sniper stop v2, false=trailingstop not based on the sniper stop v2 (trailonsniperstop) | Трейлинг по автостопу — Включает трейлинг-стоп, привязанный к уровню индикатора Sniper Stop_v2. |
| entrylogics | Логика входа — Разделитель группы настроек логики входа в сделки. |
| true=enter only as soon as the conditions are met, false=enter as longs as the conditions are met (onlycross) | Только пересечение — При включении вход происходит только в момент пересечения условия; при выключении — пока условие выполняется. |
| true=use sniper indicator for the signal, false=don't use this indicator for the signal (usesniper) | Использовать Sniper — Включает использование индикатора Sniper для формирования сигнала. |
| period of the sniper indicator (SniperPeriod) | Период Sniper — Период расчёта индикатора Sniper. |
| type of the sniper indicator (SniperType) | Тип Sniper — Тип используемого индикатора Sniper. |
| shift of the sniper indicator's arrow (arrow_shift) | Сдвиг стрелки — Сдвиг отображения стрелок индикатора Sniper. |
| alerts of the sniper indicator (Alerts) | Оповещения Sniper — Уровень оповещений индикатора Sniper. |
| true=use the sniper stop v2 indicator for the signal, false=don't use this indicator for the signal (usestop) | Использовать Sniper Stop — Включает использование индикатора Sniper Stop_v2 для формирования сигнала. |
| true=use the sniper trend a indicator for the signal, false=don't use this indicator for the signal (usetrenda) | Использовать Sniper Trend A — Включает использование индикатора Sniper Trend A для формирования сигнала. |
| true=use the sniper trend b indicator for the signal, false=don't use this indicator for the signal (usetrendb) | Использовать Sniper Trend B — Включает использование индикатора Sniper Trend B для формирования сигнала. |
| sniper value of the sniper trend b indicator (Sniper) | Значение Sniper — Параметр sniper value индикатора Sniper Trend B. |
| sniperss value of the sniper trend b indicator (SniperSS) | Значение SniperSS — Параметр sniperss value индикатора Sniper Trend B. |
| sniperp value of the sniper trend b indicator (SniperP) | Значение SniperP — Параметр sniperp value индикатора Sniper Trend B. |
| true=enable the alerts of the sniper trend b indicator, false=disable the alerts (AlertsEnabled) | Оповещения Trend B — Включает или отключает оповещения индикатора Sniper Trend B. |
| bar in the past to take in consideration for the signal (shift) | Сдвиг бара — Номер бара в прошлом, используемый для получения сигнала. |
| filersettings | Настройки фильтра — Разделитель группы настроек фильтрации сигналов. |
| enable a second sniper system on another timeframe to filter the signals (usefilter) | Использовать фильтр — Включает дополнительную систему фильтрации сигналов на другом таймфрейме. |
| timeframe of the filter (timeframe) | Таймфрейм фильтра — Таймфрейм, на котором работает фильтр сигналов. |
| true=enter only as soon as the conditions are met, false=enter as longs as the conditions are met (onlycrosstf) | Только пересечение фильтра — При включении вход происходит только в момент пересечения условия фильтра. |
| true=use sniper indicator for this filter, false=don't use this indicator for the filter (usesnipertf) | Использовать Sniper в фильтре — Включает использование индикатора Sniper для фильтрации сигналов. |
| period of the sniper indicator (SniperPeriodtf) | Период Sniper фильтра — Период расчёта индикатора Sniper для фильтра. |
| type of the sniper indicator (SniperTypetf) | Тип Sniper фильтра — Тип индикатора Sniper, используемый в фильтре. |
| shift of the sniper indicator's arrow (arrow_shifttf) | Сдвиг стрелки фильтра — Сдвиг отображения стрелок индикатора Sniper в фильтре. |
| alerts of the sniper indicator (Alertstf) | Оповещения Sniper фильтра — Уровень оповещений индикатора Sniper в фильтре. |
| true=use the sniper stop v2 indicator for the filter, false=don't use this indicator for the filter (usestoptf) | Использовать Sniper Stop в фильтре — Включает использование индикатора Sniper Stop_v2 в фильтре. |
| true=use the sniper trend a indicator for the filter, false=don't use this indicator for the filter (usetrendatf) | Использовать Trend A в фильтре — Включает использование индикатора Sniper Trend A в фильтре. |
| true=use the sniper trend b indicator for the filter, false=don't use this indicator for the filter (usetrendbtf) | Использовать Trend B в фильтре — Включает использование индикатора Sniper Trend B в фильтре. |
| sniper value of the sniper trend b indicator (Snipertf) | Значение Sniper фильтра — Параметр sniper value индикатора Sniper Trend B в фильтре. |
| sniperss value of the sniper trend b indicator (SniperSStf) | Значение SniperSS фильтра — Параметр sniperss value индикатора Sniper Trend B в фильтре. |
| sniperp value of the sniper trend b indicator (SniperPtf) | Значение SniperP фильтра — Параметр sniperp value индикатора Sniper Trend B в фильтре. |
| true=enable the alerts of the sniper trend b indicator, false=disable the alerts (AlertsEnabledtf) | Оповещения Trend B фильтра — Включает или отключает оповещения индикатора Sniper Trend B в фильтре. |
| extrafeatures | Дополнительные функции — Разделитель группы дополнительных настроек. |
| true=we continue to open orders if a new signal in the same direction than the previous appears, fal (samedirection) | Торговля в одном направлении — При включении советник продолжает открывать сделки в том же направлении при новом сигнале; при выключении ожидает противоположный сигнал. |
| true=we close the trade only after a certain time (mincloseminutes), false=disregard the time (minclosetime) | Минимальное время сделки — При включении сделка закрывается только после указанного минимального времени. |
| minimum time determined in minutes (mincloseminutes) | Минимальное время в минутах — Минимальное время удержания сделки в минутах перед возможным закрытием. |
| timefilter | Фильтр по времени — Разделитель группы настроек временного фильтра. |
| gmt offset of the broker (gmtshift) | Смещение GMT — Часовой сдвиг брокера относительно GMT. |
| enable time filter (filter) | Временной фильтр — Включает временной фильтр, ограничивающий торговлю по часам. |
| start to trade after this hour (start) | Начало торговли — Час, с которого начинается разрешённая торговля. |
| stop to trade after this hour (end) | Окончание торговли — Час, после которого торговля запрещена. |
| trade on sunday (tradesunday) | Торговля в воскресенье — Разрешает или запрещает торговлю в воскресенье. |
| enable special time filter on friday (fridayfilter) | Фильтр пятницы — Включает специальное ограничение торговли в пятницу. |
| stop to trade after this hour (fridayend) | Окончание в пятницу — Час, после которого торговля в пятницу запрещена. |
Поиск по коду файла
extern string comment="Sniper_TMA"; // comment to display in the order
extern string IndicatorName = "super-arrow-indicator";
extern int BuyBuffer = 0;
extern int SellBuffer = 1;
extern int magic=1234; // magic number required if you use different settings on a same pair, same timeframe
extern string moneymanagement="Money Management";
extern double lots=0.1; // lots size
extern bool lotsoptimized=false; // enable risk management
extern double risk=1; // risk in percentage of the account
extern double minlot=0.01; // minimum lot allowed by the expert
extern double maxlot=10; // maximum lot allowed by the expert
extern double lotdigits=2; // 1 for minilot, 2 for microlot
extern string ordersmanagement="Order Management";
extern bool oppositeclose=true; // close the orders on an opposite signal
extern bool reversesignals=false; // reverse the signals, long if short, short if long
extern int maxtrades=100; // maximum trades allowed by the traders
extern int tradesperbar=1; // maximum trades per bar allowed by the expert
extern int lstoploss=80; // long stop loss
extern int sstoploss=80; // short stop loss
extern int ltakeprofit=0; // long take profit
extern int ltakeprofit2=0; // long take profit 2
extern int ltakeprofit3=0; // long take profit 3
extern int ltakeprofit4=0; // long take profit 4
extern int ltakeprofit5=0; // long take profit 5
extern int stakeprofit=0; // short take profit
extern int stakeprofit2=0; // short take profit 2
extern int stakeprofit3=0; // short take profit 3
extern int stakeprofit4=0; // short take profit 4
extern int stakeprofit5=0; // short take profit 5
extern int trailingstart=50; // profit in pips required to enable the trailing stop
extern int trailingstop=50; // trailing stop
extern int trailingstep=10; // margin allowed to the market to enable the trailing stop
extern int breakevengain=0; // gain in pips required to enable the break even
extern int breakeven=0; // break even
int expiration=0; // expiration in minutes for pending orders
int slippage=0; // maximum difference in pips between signal and order
double maxspread=100; // maximum spread allowed by the expert
extern string advordersmanagement="Advanced Order Management";
extern bool open5orders=false; // true=open five orders as per the rule with different sl and tp, false=open one order with buystop (sl) and buytarget (tp)
extern bool closeonbadconditions=false; // true=close the orders if all conditions are not met anymore, false=don't close the orders if all conditions are not met anymore
extern bool closeonarrows=false; // true=we exit on arrows
extern bool autostop=false; // true=stoploss based on the sniper stopv2, false=stoploss not based on the sniper stop v2
extern int autostopmargin=0; // margin to add to the autostop, positive value=value to add, negative value=value to withdraw
extern int minimumstop=300; // minimum stop loss when autostop is enabled
extern int maximumstop=1000; // maximum stop loss when autostop is enabled
extern bool notradeovermaxstop=false; // true=don't trade if the distance between the price and the sniper stop v2 is higher thanmaximumstop, false=disregard this distance
extern bool trailonsniperstop=false; // true=trailing stop based on the sniper stop v2, false=trailingstop not based on the sniper stop v2
extern string entrylogics="Entry Logics";
extern bool onlycross=false; // true=enter only as soon as the conditions are met, false=enter as longs as the conditions are met
extern bool usesniper=true; // true=use sniper indicator for the signal, false=don't use this indicator for the signal
extern int SniperPeriod=30; // period of the sniper indicator
extern int SniperType=3; // type of the sniper indicator
extern int arrow_shift=30; // shift of the sniper indicator's arrow
extern int Alerts=1; // alerts of the sniper indicator
extern bool usestop=false; // true=use the sniper stop v2 indicator for the signal, false=don't use this indicator for the signal
extern bool usetrenda=false; // true=use the sniper trend a indicator for the signal, false=don't use this indicator for the signal
extern bool usetrendb=false; // true=use the sniper trend b indicator for the signal, false=don't use this indicator for the signal
extern double Sniper=0.01; // sniper value of the sniper trend b indicator
extern double SniperSS=0.1; // sniperss value of the sniper trend b indicator
extern int SniperP=7; // sniperp value of the sniper trend b indicator
extern bool AlertsEnabled=false; // true=enable the alerts of the sniper trend b indicator, false=disable the alerts
extern int shift=1; // bar in the past to take in consideration for the signal
extern string filersettings="Filter Settings";
extern bool usefilter=false; // enable a second sniper system on another timeframe to filter the signals
extern int timeframe=240; // timeframe of the filter
extern bool onlycrosstf=false; // true=enter only as soon as the conditions are met, false=enter as longs as the conditions are met
extern bool usesnipertf=true; // true=use sniper indicator for this filter, false=don't use this indicator for the filter
extern int SniperPeriodtf=30; // period of the sniper indicator
extern int SniperTypetf=3; // type of the sniper indicator
extern int arrow_shifttf=30; // shift of the sniper indicator's arrow
extern int Alertstf=1; // alerts of the sniper indicator
extern bool usestoptf=false; // true=use the sniper stop v2 indicator for the filter, false=don't use this indicator for the filter
extern bool usetrendatf=false; // true=use the sniper trend a indicator for the filter, false=don't use this indicator for the filter
extern bool usetrendbtf=false; // true=use the sniper trend b indicator for the filter, false=don't use this indicator for the filter
extern double Snipertf=0.01; // sniper value of the sniper trend b indicator
extern double SniperSStf=0.1; // sniperss value of the sniper trend b indicator
extern int SniperPtf=7; // sniperp value of the sniper trend b indicator
extern bool AlertsEnabledtf=false; // true=enable the alerts of the sniper trend b indicator, false=disable the alerts
extern string extrafeatures="Extra Features";
extern bool samedirection=true; // true=we continue to open orders if a new signal in the same direction than the previous appears, false=the EA will wait the opposite signal to enter new trades
extern bool minclosetime=false; // true=we close the trade only after a certain time (mincloseminutes), false=disregard the time
extern int mincloseminutes=61; // minimum time determined in minutes
extern string timefilter="Time Filter";
extern int gmtshift=2; // gmt offset of the broker
extern bool filter=false; // enable time filter
extern int start=4; // start to trade after this hour
extern int end=20; // stop to trade after this hour
extern bool tradesunday=true; // trade on sunday
extern bool fridayfilter=false; // enable special time filter on friday
extern int fridayend=24; // stop to trade after this hour
datetime t0,t1,lastbuyopentime,lastsellopentime;
double lastbuyopenprice,lastsellopenprice,lastbuyprofit,lastsellprofit,lastprofit;
double lotsfactor=1,initiallotsfactor=1,ilots,lastbuylot,lastselllot,lastlot,mlots;
double ask,bid,cb,sl,tp,min,max;
int i,bc=-1,tpb,tps,cnt,istart,iend,total,ticket;
int lastorder,buyorderprofit,sellorderprofit,history;
int directioninstance=0;
double pt,mt;
int dg;
int init(){
// код доступен только после оплаты
}
int start(){
// код доступен только после оплаты
}
/*
GlobalVariableSet("vGrafBalance",AccountBalance());
GlobalVariableSet("vGrafEquity",AccountEquity());
*/
RefreshRates();
ask=MarketInfo(Symbol(),MODE_ASK);
bid=MarketInfo(Symbol(),MODE_BID);
if(breakevengain>0)movebreakeven(breakevengain,breakeven);
if(trailingstop>0)movetrailingstop(trailingstart,trailingstop);
if(trailonsniperstop){
double STBs=iCustom(Symbol(),0,"Sniper Stop_v2",0,shift);
double STRs=iCustom(Symbol(),0,"Sniper Stop_v2",1,shift);
for(i=0;i<OrdersTotal();i++){
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if(OrderType()<=OP_SELL && OrderSymbol()==Symbol() && OrderMagicNumber()==magic){
if(OrderType()==OP_BUY){
if(((NormalizeDouble(OrderStopLoss(),dg)<NormalizeDouble(STBs,dg))||(OrderStopLoss()==0)) && STBs!=0 && STBs!=EMPTY_VALUE
&& NormalizeDouble((Ask-STBs)/pt,dg)>=MarketInfo(Symbol(),MODE_STOPLEVEL)){
OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(STBs,dg),OrderTakeProfit(),0,Blue);
return(0);
}
}
else{
if(((NormalizeDouble(OrderStopLoss(),dg)>NormalizeDouble(STRs,dg))||(OrderStopLoss()==0)) && STRs!=0 && STRs!=EMPTY_VALUE
&& NormalizeDouble((STRs-Bid)/pt,dg)>=MarketInfo(Symbol(),MODE_STOPLEVEL)){
OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(STRs,dg),OrderTakeProfit(),0,Red);
return(0);
}
}
}
}
}
/*
lastbuylot=0;
lastselllot=0;
lastorder=0;
history=OrdersHistoryTotal();
if(history>0){
for(i=0;i<history;i++){
OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic){
lastprofit=OrderProfit();
lastlot=OrderLots();
if(OrderType()==OP_BUY){
lastbuyprofit=OrderProfit();
lastbuylot=OrderLots();
lastorder=1;
}
if(OrderType()==OP_SELL){
lastsellprofit=OrderProfit();
lastselllot=OrderLots();
lastorder=2;
}
}
}
}
mlots=0;
if(martingale && lastprofit<0)mlots=NormalizeDouble(lastlot*multiplier,lotdigits);else mlots=lots;
total=OrdersTotal();
if(total>0){
for(i=0;i<total;i++){
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderCloseTime()==0){
if(OrderType()==OP_BUY){
lastbuyopentime=OrderOpenTime();
lastbuyopenprice=OrderOpenPrice();
buyorderprofit=OrderProfit();
}
if(OrderType()==OP_SELL){
lastsellopentime=OrderOpenTime();
lastsellopenprice=OrderOpenPrice();
sellorderprofit=OrderProfit();
}
}
}
}
*/
if(tradesperbar==1 && (((TimeCurrent()-lastbuyopentime)<Period()) || ((TimeCurrent()-lastsellopentime)<Period()))){tpb=1;tps=1;}
if(bc!=Bars){tpb=0;tps=0;bc=Bars;}
if(usesniper){
double SNI0=iCustom(Symbol(),0, IndicatorName,+ BuyBuffer,+ BuyBuffer); //BUY
double SNI1=iCustom(Symbol(),0, IndicatorName,+ SellBuffer,+ SellBuffer); //SELL
}
if(usestop || autostop){
double STB=iCustom(Symbol(),0,"Sniper Stop_v2",0,shift);double STR=iCustom(Symbol(),0,"Sniper Stop_v2",1,shift);
double STBa=iCustom(Symbol(),0,"Sniper Stop_v2",0,shift+1);double STRa=iCustom(Symbol(),0,"Sniper Stop_v2",1,shift+1);
}
if(usetrenda){
double TAB=iCustom(Symbol(),0,"Sniper Trend A",0,shift);double TAR=iCustom(Symbol(),0,"Sniper Trend A",1,shift);
double TABa=iCustom(Symbol(),0,"Sniper Trend A",0,shift+1);double TARa=iCustom(Symbol(),0,"Sniper Trend A",1,shift+1);
}
if(usetrendb){
double TBB=iCustom(Symbol(),0,"Sniper Trend B",Sniper,SniperSS,SniperP,AlertsEnabled,1,shift);double TBR=iCustom(Symbol(),0,"Sniper Trend B",Sniper,SniperSS,SniperP,AlertsEnabled,0,shift);
double TBBa=iCustom(Symbol(),0,"Sniper Trend B",Sniper,SniperSS,SniperP,AlertsEnabled,1,shift+1);double TBRa=iCustom(Symbol(),0,"Sniper Trend B",Sniper,SniperSS,SniperP,AlertsEnabled,0,shift+1);
}
double signal=0;
double signala=0;
if((usesniper==false || (usesniper && SNI0<350))
&& (usestop==false || (usestop && STB<350)) && (usetrenda==false || (usetrenda && TAB!=0)) && (usetrendb==false || (usetrendb && TBB!=0)))signal=1;
if((usesniper==false || (usesniper && SNI1<350))
&& (usestop==false || (usestop && STR<350)) && (usetrenda==false || (usetrenda && TAR!=0)) && (usetrendb==false || (usetrendb && TBR!=0)))signal=2;
if(usefilter){
if(usesniper){
double SNI0tf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,0,shift);
double SNI2tf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,2,shift);
double SNI4tf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,4,shift);
double SNI1tf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,1,shift);
double SNI3tf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,3,shift);
double SNI5tf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,5,shift);
double SNI0atf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,0,shift+1);
double SNI2atf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,2,shift+1);
double SNI4atf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,4,shift+1);
double SNI1atf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,1,shift+1);
double SNI3atf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,3,shift+1);
double SNI5atf=iCustom(Symbol(),timeframe,"Sniper",SniperPeriodtf,SniperTypetf,arrow_shifttf,Alertstf,5,shift+1);
}
if(usestoptf){
double STBtf=iCustom(Symbol(),timeframe,"Sniper Stop_v2",0,shift);double STRtf=iCustom(Symbol(),timeframe,"Sniper Stop_v2",1,shift);
double STBatf=iCustom(Symbol(),timeframe,"Sniper Stop_v2",0,shift+1);double STRatf=iCustom(Symbol(),timeframe,"Sniper Stop_v2",1,shift+1);
}
if(usetrendatf){
double TABtf=iCustom(Symbol(),timeframe,"Sniper Trend A",0,shift);double TARtf=iCustom(Symbol(),timeframe,"Sniper Trend A",1,shift);
double TABatf=iCustom(Symbol(),timeframe,"Sniper Trend A",0,shift+1);double TARatf=iCustom(Symbol(),timeframe,"Sniper Trend A",1,shift+1);
}
if(usetrendbtf){
double TBBtf=iCustom(Symbol(),timeframe,"Sniper Trend B",Snipertf,SniperSStf,SniperPtf,AlertsEnabledtf,1,shift);
double TBRtf=iCustom(Symbol(),timeframe,"Sniper Trend B",Snipertf,SniperSStf,SniperPtf,AlertsEnabledtf,0,shift);
double TBBatf=iCustom(Symbol(),timeframe,"Sniper Trend B",Snipertf,SniperSStf,SniperPtf,AlertsEnabledtf,1,shift+1);
double TBRatf=iCustom(Symbol(),timeframe,"Sniper Trend B",Snipertf,SniperSStf,SniperПоказано первые 50% кода (символов: 25423)
Открыть по тарифу
Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.
Разовая покупка файла
На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.
Зачем нужен email? После подтверждения оплаты файл сохранится в кабинете на этот email. Если аккаунта ещё нет, мы создадим его и пришлём ссылку для задания пароля. Если аккаунт уже есть, покупка добавится в него. Укажите адрес, к которому у вас есть доступ.
Чтобы оформить заказ, введите email и перейдите к оплате.