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

İş Gereklilikleri

Добрый день.

Необходимо переписать существующий код, применяемый с 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 





Yanıtlandı

1
Geliştirici 1
Derecelendirme
(182)
Projeler
186
27%
Arabuluculuk
0
Süresi dolmuş
3
2%
Ücretsiz
2
Geliştirici 2
Derecelendirme
(555)
Projeler
922
48%
Arabuluculuk
300
59% / 25%
Süresi dolmuş
123
13%
Ücretsiz
Benzer siparişler
Desired Features: Simultaneous opening of buy and sell orders at market price Grid order placement with a user-defined distance in pips between orders Basic trailing stop loss to automatically close positions in loss Gain trailing stop loss to activate and trail stop loss as positions move into profit Customizable input parameters for configuring the strategy Advanced risk management features (optional) Technical
I need an expert to develop a Forex Expert Advisor (EA) for the MetaTrader 4 platform focusing on short-term scalping strategy. This EA should be able to open trades when a new candle opens and close trades when the same candle closes, taking into account the very smallest price variations. Key aspects of the project and requirements from the developer would include: They speak English. No exceptions They write in
Hi I need to create a Expert Advisor, that can pass prop firm Challenges (1 or 2 phases), like FTMO, MFF, TFF etc. NO martingale strategy. Need to have nice entries and exits. NO big lots and low risk. Need complied with this restrictions: -Profit 10% -Max Drawdown (DD) 10% -Max Daily Loss 4% -All trades with SL -NO trades during and after high impact news -Able to use it on Funded Accounts and Live Accounts -Proven
Hi I need to change the existing indicator in an EA and to replace the same with a new one. Rest all remain the same. EA should work with all the same function, just to change the indicator for trade initialisation. Simple job
Bonjour à tous, Je recherche un **expert en développement informatique**, spécialisé en **trading algorithmique**. Le candidat idéal aura une solide expérience dans le développement de stratégies de trading automatisées et une connaissance approfondie des indicateurs **TradingView**. **Responsabilités:** - Développer et optimiser les algorithmes de trading - Utiliser les indicateurs TradingView comme base pour le
Mrtools EA 50 - 60 USD
Hello Ladies and Gents. I need a expert programer with solid coding skills to help me build a robot, this robot uses a combination of 3 indicators stch. rsi and CS indicators. It also uses a combination of 3 timeframes for each indicator. I have explained in detailed how i want this bot to work and i have also stated the needed settings and options, you can find it all in the attached zip file. Due to bad
are you able to develop a alert system in NT8 based on 8 candlestick patterns? 1. hammer 2. shooting star 3. bullish engulfing 4. bearish engulfing ..if any body is available for this kind do well to bid and let talk more on it
The purpose is when gold is trading against me also when I sleep, the equity will be saved so I can decide what to do as soon as I see this in my account. So if I have 12 orders buy with a total of 2.4 lotsize, There should be placed an order with same lotsize in opposite direction or all orders in my account placed in opposite direction. I think I prefer to have all the orders in my account copied and placed in
Hello, I have an existing Expert Adviseo for Metatrader 5 that still contains a few errors. (The MQL5 code is present.) I would like to have these errors fixed. If necessary I would add a few more features to the EA
Requesting to draw lines based on highs and lows of previous periods plus a calculated number. The EA to take signals based on these lines. I will share details on private

Proje bilgisi

Bütçe
30 - 150 USD
Geliştirici için
27 - 135 USD
Son teslim tarihi
from 2 to 21 gün