(Req) Round numbers

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

(Req) Round numbers

Postby daniel.kovacik » Mon Sep 26, 2016 11:39 am

Hi,

can anybody translate this code for TS?

Thanks in advance
Regards,
DK

Code: Select all
//@version=2
study("YK Round Levels", overlay=true)

roundLevel50 = input(25, 'Round Level 1, pips')
roundLevel100 = input(50, 'Round Level 2, pips')

rDelimeter = 1/syminfo.mintick

intRoundLevel = close * rDelimeter

intRemainder = intRoundLevel % roundLevel50
toRound = (intRemainder >= roundLevel50/2) ? roundLevel50 : 0
roundLevel = (intRoundLevel - intRemainder + toRound) / rDelimeter
plot(roundLevel, title='Round Level 1', color=orange, style=circles, transp=0, linewidth=1)

intRemainder2 = intRoundLevel % roundLevel100
toRound2 = (intRemainder2 >= roundLevel100/2) ? roundLevel100 : 0
roundLevel2 = (intRoundLevel - intRemainder2 + toRound2) / rDelimeter
plot(roundLevel2, title='Round Level 2', color=lime, style=circles, transp=0, linewidth=1)

alertcondition((high >= roundLevel and low <= roundLevel) or (high >= roundLevel2 and low <= roundLevel2), title='Alert on the Round Level', message='Round Level!')
daniel.kovacik
FXCodeBase: Initiate
 
Posts: 163
Joined: Thu Jun 12, 2014 9:09 pm


Re: (Req) Round numbers

Postby daniel.kovacik » Wed Sep 28, 2016 9:44 am

Hi,

those variants are little bit noise with other stuff in chart. Could it be same as this?

Thanks in advance
Regards,
DK
Attachments
round numbers.png
daniel.kovacik
FXCodeBase: Initiate
 
Posts: 163
Joined: Thu Jun 12, 2014 9:09 pm

Re: (Req) Round numbers

Postby Apprentice » Sun Oct 02, 2016 5:02 am

Your request is added to the development list, Under Id Number 3642
If someone is interested to do this task, please contact me.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: (Req) Round numbers

Postby Alexander.Gettinger » Tue Nov 28, 2017 12:10 pm

Please, try this indicator: viewtopic.php?f=17&t=65407
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Google [Bot] and 15 guests