Hi.
How do I turn a number such as 34.0097 in my screener criteria into an integer or just rounded by 1 decimal place?
Also, if I want to compare a price to a range, say, over the previous 10 trading days how would I use the RANGE[n] function correctly?
Thanks.
Hi,
For your first question you can use ROUND instruction that will round your decimal number to the nearest superior value.
About finding a range of 10 days in the past, you can find it with the HIGHEST and LOWEST instructions, please have a look into the online documentation.
Finding the highest high and lowest low of the last n days is like compiling the last n candlesticks into a biggest one, so you get your range.
Thanks.
So to round up this to 1 decimal place:
Percent = ((EMA10-EMA60)/close)
it’d be…
Percent = ((EMA10-EMA60)/close) ROUND(1)
No the syntax would be:
Percent = ROUND((EMA10-EMA60)/close)
But you cannot round up in decimal, only in entire number, sorry.