I need this Pinescript Indicator Converted to ML5

Работа завершена

Время выполнения 4 дня
Отзыв от заказчика
Awesome coder - will definitely use again.
Отзыв от исполнителя
Awesome customer. A pleasure to work with him.

Техническое задание

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © MightyZinger

//@version=5

indicator('Slope Adaptive Moving Average (MZ SAMA)', shorttitle='MZ SAMA', overlay=true)

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////                        MZ SAMA                           //////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////

chartResolution = input.timeframe('', title='Chart Resolution')
src = input.source(close, 'Source')

// Length Inputs
string grp_1 = 'SAMA Length Inputs'
length = input(200, title='Adaptive MA Length', group = grp_1) // To check for Highest and Lowest value within provided period
majLength = input(14, title='Major Length', group = grp_1)     // For Major alpha calculations to detect recent price changes
minLength = input(6, title='Minor Length', group = grp_1)      // For Minor alpha calculations to detect recent price changes

// Slope Inputs
string grp_2 = 'Slope and Dynamic Coloring Parameters'
slopePeriod = input.int(34, title='Slope Period', group = grp_2)
slopeInRange = input.int(25, title='Slope Initial Range', group = grp_2)
flat = input.int(17, title='Consolidation area is when slope below:', group = grp_2)
bull_col = input.color(color.green, 'Bull Color  ', inline='dyn_col', group = grp_2)
bear_col = input.color(color.red, 'Bear Color  ', inline='dyn_col', group = grp_2)
conc_col = input.color(color.yellow, 'Reversal/Consolidation/Choppiness Color  ', inline='dyn_col', group = grp_2)

showSignals = input.bool(true, title='Show Signals on Chart', group='Plot Parameters')

//Slope calculation Function to check trend strength i.e. consolidating, choppy, or near reversal

calcslope(_ma, src, slope_period, range_1) =>
    pi = math.atan(1) * 4
    highestHigh = ta.highest(slope_period)
    lowestLow = ta.lowest(slope_period)
    slope_range = range_1 / (highestHigh - lowestLow) * lowestLow
    dt = (_ma[2] - _ma) / src * slope_range
    c = math.sqrt(1 + dt * dt)
    xAngle = math.round(180 * math.acos(1 / c) / pi)
    maAngle = dt > 0 ? -xAngle : xAngle
    maAngle

//MA coloring function to mark market dynamics 

dynColor(_flat, slp, col_1, col_2, col_r) =>
    var col = color.new(na,0)
    // Slope supporting bullish uprtrend color
    col := slp > _flat ? col_1:
    // Slope supporting bearish downtrend color
         slp <= -_flat ? col_2:
    // Reversal/Consolidation/Choppiness color
         slp <= _flat and slp > -_flat ? col_r : col_r   
    col

//AMA Calculations

ama(src,length,minLength,majLength)=>
    minAlpha = 2 / (minLength + 1)
    majAlpha = 2 / (majLength + 1)
    
    hh = ta.highest(length + 1)
    ll = ta.lowest(length + 1)
    
    mult = hh - ll != 0 ? math.abs(2 * src - ll - hh) / (hh - ll) : 0
    final = mult * (minAlpha - majAlpha) + majAlpha
    
    final_alpha = math.pow(final, 2)            // Final Alpha calculated from Minor and Major length along with considering Multiplication factor calculated using Highest / Lowest value within provided AMA overall length
    var _ama = float(na)
    _ama := (src - nz(_ama[1])) * final_alpha + nz(_ama[1]) 
    _ama

// SAMA Definition
sama = request.security(syminfo.tickerid, chartResolution, ama(src,length,minLength,majLength))

// Slope Calculation for Dynamic Coloring
slope = calcslope(sama, src, slopePeriod, slopeInRange)  

// SAMA Dynamic Coloring from slope
sama_col = request.security(syminfo.tickerid, chartResolution, dynColor(flat, slope, bull_col, bear_col, conc_col))

// SAMA Plot
plot(sama, 'MZ SAMA', sama_col, 4)


// BUY & SELL CONDITIONS AND ALERTS
_up = sama_col == bull_col
_downn = sama_col == bear_col 
_chop = sama_col == conc_col
buy  = _up and not _up[1] 
sell = _downn and not _downn[1]
chop_zone = _chop and not _chop[1]

_signal() =>
    var sig = 0
    if buy and sig <= 0
        sig := 1
    if sell and sig >= 0
        sig := -1
    sig    

sig = _signal()

longsignal  = sig ==  1 and (sig !=  1)[1]
shortsignal = sig == -1 and (sig != -1)[1]

// Plotting Signals on Chart
atrOver = 1 * ta.atr(5)   // Atr to place alert shape on chart
plotshape(showSignals and longsignal  ? (sama - atrOver) : na , style=shape.triangleup, color=color.new(color.green, 30), location=location.absolute, text='Buy', size=size.small)
plotshape(showSignals and shortsignal ? (sama + atrOver): na , style=shape.triangledown, color=color.new(color.red, 30), location=location.absolute, text='Sell', size=size.small)

// Signals Alerts
alertcondition(longsignal, "Buy",  "Go Long" )
alertcondition(shortsignal, "Sell", "Go Short")
alertcondition(chop_zone, "Chop Zone", "Possible Reversal/Consolidation/Choppiness")

if longsignal 
    alert("Buy at" + str.tostring(close), alert.freq_once_per_bar_close)
if shortsignal
    alert("Sell at" + str.tostring(close), alert.freq_once_per_bar_close)

Откликнулись

1
Разработчик 1
Оценка
(236)
Проекты
440
26%
Арбитраж
125
21% / 57%
Просрочено
96
22%
Работает
2
Разработчик 2
Оценка
(27)
Проекты
27
26%
Арбитраж
2
0% / 50%
Просрочено
1
4%
Свободен
3
Разработчик 3
Оценка
(22)
Проекты
24
8%
Арбитраж
0
Просрочено
0
Свободен
4
Разработчик 4
Оценка
(94)
Проекты
190
66%
Арбитраж
8
25% / 50%
Просрочено
2
1%
Свободен
5
Разработчик 5
Оценка
(57)
Проекты
72
22%
Арбитраж
13
46% / 15%
Просрочено
5
7%
Свободен
6
Разработчик 6
Оценка
(254)
Проекты
572
36%
Арбитраж
64
20% / 58%
Просрочено
147
26%
Свободен
7
Разработчик 7
Оценка
(289)
Проекты
432
64%
Арбитраж
5
40% / 0%
Просрочено
4
1%
Загружен
Похожие заказы
Hello, This is pretty simple and its an indicator with On/Off button 1-Off will remove all indicator from the chart. 2-On will put them all back again with the same settings
Trading bot 300+ USD
We need bot that trades when medium and low impact news hits It will release pending order both directions few min prior to news impact And will have certain risk management strategy attached Example If Monday and Tuesday news successful clears profits It will reduce risk for next news events until new week starts each week message on tg: Dstatewealthtrading NOTE: 4 YAERS OF EXPERIENCE UPWORD, YOU MUST BE A
I need someone the create a supertrend indicator based on Heikin Ashi candles instead of normal candles. Needs to be exactly the same as the supertrend (original one) + ha from tradingview. In m1,m5,m15 the indicator must have the same values ​​found with the tradingview. Work that meets this requirement will be accepted ( depending on the broker and spread, however, a few pips of difference will be accepted)
Here is a detailed instruction for the coder to implement the vertical lines based on the BrainTrainSignalAlert indicator: --- **Task: Implement Vertical Lines for Alerts from BrainTrainSignalAlert Indicator** **Objective:** Create a system that adds vertical lines on specified timeframes (M5 or M30) whenever an alert is generated by the BrainTrainSignalAlert indicator on the H1, H4, and D1 timeframes. The lines
Hello Guys! I want to modify/fix the indicator that uses sequential type of entries (it calculates from 1 to 9) and if the conditions are met it provides an arrow (signal) with alert. The problem is that, sometimes (for unknown for me reasons) it repaints arrow signal. Like on the picture: Signal 1 - correct signal Signal 2 - correct signal Signal 3 - correct signal Signal 4 - repaints (signal 3 arrow dissapeared
Hi, I have a Live Data feature for my trading accounts that lets me check details like total open positions, number of lots, profits, etc. I need someone to add the number of pending orders to this live data. This is important for me to ensure that all accounts have the same number of pending orders, since I use a copy trading system. Also, there is a website where I check all the data. In this case, you would need
I came across an indicator that's perfectly good in catching spikes in boom amd crash but i would want it to be modified and to improve accuracy As a professional you will have to go through the indicator and explain to me the strategy with which the indicator was buid and tell me the possibility of improving it better
An EA that executes when the 21 and 55 SMA Cross on certain time frame also the EA will understand supply and demand levels and executes when price reacts on this levels specified and target/stoploss levels will be predetermined...also the robot will also comprise stochastic oscillator
I have a full code ,, There are some errors in this.It does not add to the chart, does not show arrow marks, does not alert ,, fix this problem and work properly,, Contact on telegram @Gw_rakib1
Starting from scratch, I need a solution to develop my own crypto trading and exchange platform. This platform should compare prices across various exchanges like Coinbase, Binance, KuCoin, and Unocoin, as well as different cryptocurrencies. The solution must identify opportunities to buy on one platform and sell on another for a profit, transferring funds to my personal wallet instantly for security. The bot should

Информация о проекте

Бюджет
30 - 80 USD
Исполнителю
27 - 72 USD
Сроки выполнения
до 2 дн.