Create TradingView indicator that plots an EMA based on ATR

Completado Publicado hace un año Pagado a la entrega
Completado Pagado a la entrega

This should be a real quick and easy job if you know Pinescript. I think it just needs a custom EMA function.

I want to use the value of the current ATR as the length of an EMA. Since ATR is a float, I used int() to convert to integer. But it needs to be a "simple int". How do I do that?

Here is the code to modify.

//@version=5

indicator(title="EMA + ATR", shorttitle="EMA + ATR", overlay=true, timeframe="", timeframe_gaps=true)

i_ATRlength = [login to view URL](10, minval=1, title="Length")

i_Source = input(close, title="Source")

ATRcalc = [login to view URL](i_ATRlength)

ATRint = int(ATRcalc)

EMAcalc = [login to view URL](i_Source, ATRint)

plot(EMAcalc, title="EMA", color=[login to view URL])

I can make it look nicer and I'll be adding more to it, but I need to get this base working first.

Thanks!

Pine Script Python

Nº del proyecto: #36172309

Sobre el proyecto

7 propuestas Proyecto remoto Activo hace un año

Adjudicado a:

(62 comentarios)
6.0

7 freelancers están ofertando un promedio de $30 por este trabajo

ARrowofTime

Please check my portfolio I can do: Indicator/strategy Backtesting: Spot, margin, combined spot and margin, leverage, liquidation, partial order… Visualization Alerts Multiple indicators in one indicator Make ch Más

$30 USD en 7 días
(41 comentarios)
5.9
Milvetti

Hello, I hope you are well. I can deliver within 1 hour. Please contact me for details. Have a nice day

$30 USD en 1 día
(10 comentarios)
3.6
ahmedabdulhamza

Hi I can help you to To convert the float value of ATR to a "simple int", you can use the round() function in Pine Script. The round() function rounds a floating-point number to the nearest integer.

$20 USD en 7 días
(5 comentarios)
1.8
Sabahat516

I believe I am the best candidate for this job as I have experience in coding and am proficient in Pinescript. I have a solid understanding of data types and conversions, and can easily create custom functions to suit Más

$20 USD en 7 días
(0 comentarios)
0.0