Доработка и создание советника

MQL4 Indicatori Esperti

Specifiche

Добрый день.

Необходимо переписать существующий код, применяемый с TradingView и создать автоматического бота (советника) для платформы Metatraider 4.

Задание по коду:

1) Условия для входа будут такими же, как и в Стратегии, только выход из сделки будет автоматически при условии +0,20 пунктов.
2) Тайм-фрейм - 3м
3) SL - отсутствует
4) Манименджмент 5% от депо
5) Использоваться будет на криптовалютном рынке


Код стратегии:



//примечание: для распределения 1 оператора по нескольким строкам требуется 1 apce + 1 tab | 
многострочная функция — 1 вкладка 


//Рекомендуемые тикеры: SPY (D), QQQ (D) и большие индексы, AAPL (4H) 



// @version=5 


 стратегия ( 

«Davin's 10/200MA Pullback on SPY Strategy v2.0» 

 , 


     overlay= 

true 

 , 


     initial_capital= 

10000 

 , 


     default_qty_type=strategy.percent_of_equity, 


     default_qty_value= 

10 

 , 

// 10% капитала на каждую сделку 


      Commission_type=strategy.commission.cash_per_contract, 


     Commission_value = 

0.1 

 ) 

//Вставьте курс вашего брокера, IB 0,005USD или многоуровневый 



//Лучшие параметры 


// SPY D 


// Стоп-лосс 0,15 


// комиссия 0,005 USD при использовании Interactive Brokers 


// Выход при более низком закрытии 


// Купить больше, когда x% вниз --> 14% 


// НЕ ВКЛЮЧАТЬ стоп-условие с использованием пересечения MA 



// Получение пользовательского ввода 


 i_ma1 = 

input 

 . 

int 

 (title= 

"Длина MA 1" 

 , defval= 

200 

 , step= 

10 

 , group= 

"Параметры стратегии" 

 , tooltip= 

"Долгосрочная MA 200" 

 ) 


i_ma2 = 

input 

 . 

инт 

(название = 

«Длина скользящей средней 2» 

 , defval = 

10 

 , шаг = 

10 

 , группа = 

«Параметры стратегии» 

 , всплывающая подсказка = 

«Краткосрочная скользящая средняя 10» 

 ) 


i_ma3 = 

input 

 . 

int 

 (title= 

"Длина MA 3" 

 , defval= 

50 

 , step= 

1 

 , group= 

"Параметры стратегии" 

 , tooltip= 

"MA for crossover signal`" 

 ) 


i_stopPercent = 

input 

 . 

float 

 (title= 

"Процент стоп-лосса" 

 , defval= 

0,15 

 , step= 

0,01 

 , group= 

" 


"Жесткий стоп-лосс 10%" 

 ) 


i_startTime = 

input 

 .time(title= 

"Начальный фильтр" 

 , defval=timestamp( 

"01 января 2013 13:30 +0000" 

 ), group= 

"Временной фильтр" 

 , tooltip= 

"Дата начала и время начала" 

 ) 


i_endTime = 

input 

 .time(title= 

"Конец фильтра" 

 , defval=timestamp( 

"01 января 2099 19:30 +0000" 

 ), group= 

"Фильтр времени" 

 , tooltip= 

"Дата окончания и время до стоп" 

 ) 


i_lowerClose = 

ввод 

 . 

bool 

 (title= 

"Выход при нижнем закрытии" 

 , 



«Параметры стратегии» 

 , tooltip= 

«Подождите закрытия ниже после 10SMA выше, прежде чем выйти» 

 ) 

// оптимизация стратегии выхода, логический тип создает входные данные типа 


 галочки i_contrarianBuyTheDip = 

input 

 . 

bool 

 (title= 

"Покупайте всякий раз, когда просадка превышает x%" 

 , defval= 

true 

 , group= 

"Параметры стратегии" 

 , tooltip= 

"Покупайте при просадке! Всякий раз, когда просадка SPY составляет x% или более" 

 ) 


i_contrarianTrigger = 

input 

 . 

int 

 (title= 

"Запустить % падения, чтобы купить падение" 

 , defval= 

14 

 , step= 

1 

 , group= 

" 

, tooltip= 

"% падения, чтобы спровоцировать противоположный Buy the Dip!" 

) 


//14% лучше для SPY 1D 


//20% лучше для AMZN 1D 


 i_stopByCrossover_MA2_3 = 

input 

 . 

bool 

 (title= 

"Включать условие стопа при пересечении MA" 

 , defval= 

false 

 , group= 

"Параметры стратегии" 

 , tooltip= 

"Продавать при пересечении MA2/1" 

 ) 



// Получаем значения индикатора 


 ma1 = ta.sma(close, i_ma1) 

//параметр 1 


 ma2 = ta.sma(close,i_ma2) 

//параметр 2 


 ma3 = ta.sma(close,i_ma3) 

//параметр 3 


 ma_9 = ta.ema(close, 

9 

 ) 

//параметр 2 


 ma_20 = та.эма (близко, 

20 

 ) 

//param 3 



// Проверить фильтр(ы) 


 f_dateFilter = time >+ i_startTime и time <= i_endTime 

//убедиться, что введенные даты находятся в допустимом диапазоне 



// Самая высокая цена за предыдущие 52 дня: https://www. Tradingcode.net/tradingview/наибольшее-максимальное-значение/#:~:text=()%20versus%20ta.-,highest(),max()%20and%20ta. 


наивысшее52 = ta.highest(high, 

52 

 ) 


total_change = ((highest52 - close[ 

0 

 ]) / наивысшее52) * 

100 



// Проверяем условия покупки/продажи 


 var 

float 

 buyPrice = 

0  

// инициализируем цену покупки, она изменится, когда мы введем торговля ; 
float = десятичное число тип данных 0.0 


buyCondition = (close > ma1 и close < ma2 и Strategy.position_size == 

0 

 и f_dateFilter) или (strategy.position_size == 

0 

 и i_contrarianBuyTheDip == 

true 

 и total_change > i_contrarianTrigger и f_dateFilter) 

// выше 200sma, ниже краткосрочного ma (откат) + избегайте формирования пирамиды позиций 


 sellCondition = close > ma2 and Strategy.position_size > 

0 

 и (не i_lowerClose или close < low[ 

1 

 ])   

//проверка, торгуем ли мы уже + закрытие выше 10MA; 


// третье условие: ЛИБО i_lowerClose не включен ИЛИ цена закрытия должна быть < LOW предыдущей свечи [1] 



 stopDistance = Strategy.position_size > 

0 

? 
((buyPrice - close)/close) : нет данных 

// проверить, если в сделке > расчет % отбрасывает расстояние от точки входа, если нет 


 данных stopPrice = Strategy.position_size > 

0 

 ? 
(buyPrice - (buyPrice * i_stopPercent)) : нет данных 

// рассчитать цену SL, если в сделке, если нет, то нет 


 данных stopCondition = (strategy.position_size > 

0 

 и stopDistance > i_stopPercent) или (strategy.position_size > 

0 

 и (i_stopByCrossover_MA2_3== 

true 

 ) и ma3 < ma1)) 




// Входим в позиции 


, если 

 buyCondition 


    Strategy.entry(id= 

"Long" 

 , direction=strategy. 

long 

 ) 

//длинные, только 

    


если 

 buyCondition[ 

1 

 ] 

// если buyCondition истинно, предыдущая свеча 


     buyPrice := open 

// цена входа = текущая цена открытия бара 



// выход из позиции 


, если 

 sellCondition или stopCondition 


    Strategy.close(id= 

"Long" 

 , comment = 

"Exit" 

 + (stopCondition ? 

"Stop loss=true" 

 : 

"" 

 )) 

// если условие? 
"Значение для истинного" : "значение для ложного" 


     buyPrice := na 

//сброс buyPrice 



// График 


 plot(buyPrice, 

color 

 = 

color 

 .lime, style=plot.style_linebr) 


plot(stopPrice, 

color 

 = 

color 

 .red, style= plot.style_linebr, 


) 


plot(ma1, 

цвет 

 = 

цвет 

 .синий) 

//defval=200 


 plot(ma2, 

цвет 

 = 

цвет 

 .white) 

//defval=10 


 plot(ma3, 

цвет 

 = 

цвет 

 .yellow) 

// defval=50 





Con risposta

1
Sviluppatore 1
Valutazioni
(185)
Progetti
190
27%
Arbitraggio
0
In ritardo
3
2%
Gratuito
2
Sviluppatore 2
Valutazioni
(555)
Progetti
922
48%
Arbitraggio
300
59% / 25%
In ritardo
123
13%
Caricato
Ordini simili
Hello, I have an indicator that counts days and plots vertical lines after specific interval days from specific dates. I want to convert it for my trading view following all the inputs and settings
Hello please final budget 30$ Indicator name : Smart Money Concepts [LuxAlgo] I need to convert tradingview indicator to MetaTrader 5 indicator, And i need all functions and options appear in MT5 like in tradingview, And when i back to historical data in MT5 i need to be like tradingview exactly, And i need it today. Looking for least price and least time and clean code with zero error and zero warnning
Seeking someone who can create a robot or algorithm capable of sending 5-10 daily forex signals, each with 3 types of take profit, and achieving a high success rate similar to the one shown in the attached picture
Metatrader 30+ USD
I would like to calculate the deviations between the companies listed below with Meta Trader. Would you be interested? BETWEEN 01.00 AT NIGHT AND 00.00 OF THE NEXT DAY (FOR HOURS WHEN THE GOLD MARKET IS OPEN) *Instant comparison of prices of the same parities of different companies *Determination of deviation rates in downward or upward movements (average prices, prices below and above the average) *Detection of
I would like to calculate the deviations between the companies listed below with Meta Trader. Would you be interested? BETWEEN 01.00 AT NIGHT AND 00.00 OF THE NEXT DAY (FOR HOURS WHEN THE GOLD MARKET IS OPEN) *Instant comparison of prices of the same parities of different companies *Determination of deviation rates in downward or upward movements (average prices, prices below and above the average) *Detection of
The strategy is based on identifying overbought and oversold conditions across multiple timeframes. The primary indicator used is the stochastic indicator. Stochastic Settings: • %K period: 100 • %D period: 5 • Slowing: 4 •Price field : close/close For buying: • stochastic Signal line/Both Most be in the oversold zone (20 level of stochastic) on the H4, H1, 30m, 15m, 5m, and 1m timeframes. Final confirmation For a
Hello, I have an indicator on Trend View. I would like to convert it to a robot. The indicator is not very large, very simple, and works on a small time frame. Must be available Stop loss Setting goals Lot size time frame
Greenprint strategy 30 - 100 USD
Hello i need someone who can create an indicator to show the resistance support and pivot areas like in the shown images the indicators are bollinger bands moving averages also we have rsi and ma . Pictures below. You should be able to do work properly requesting a trial check when work is complete the indicator should also work with synthetic indices
I want someone who can create a Automatic mobile trading bot/EA with my kind of strategy...Example: : When The market is buying and rejects an has created an M formation the First leg is higher than the second leg(first leg Higher high,second leg lower high then a line must touch the peak of the Higher high then connect with the peak of the lower High as a Footprint line,then there must be Another line that touches
This isn’t your traditional project. I already have a completed program and script. This is just a add-on. I can share with you some of the current coding script and algorithm, but essentially I’m just looking for you to expand on the current one I have. From my experience, I can’t see an experience programmer taking more than an hour or two of their billable time to complete this

Informazioni sul progetto

Budget
30 - 150 USD
Per lo sviluppatore
27 - 135 USD
Scadenze
da 2 a 21 giorno(i)