Create TradingView indicator that plots an EMA based on ATR
$10-30 USD
货到付款
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!
项目ID: #36172309
关于项目
授予:
有7名威客正在参与此工作的竞标,均价$30/小时
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 更多
Hello, I hope you are well. I can deliver within 1 hour. Please contact me for details. Have a nice day
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.
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 更多