TradingView
allanster
11 de Feb. de 2022 23:37

How To Identify Type Of Number 

Bitcoin / United States DollarCoinbase

Descripción

Example function accepts loading of _value for types float, int, or string, then identifies whether the loaded _value is a string number, string, or number.

Notas de prensa

Revision 1

Declaration for mutability of 'identify' variable was not needed, removed initial declaration and changed 'identify' variable to non mutable.

NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Comentarios
WhatSaysTechCharts
Hi How to check if Stock day high price format is like NNN or NNN.N0 (all digits should be same)
allanster
@WhatSaysTechCharts, greetings, if you mean by using the above example script on daily chart then you could add the following line after the function has been defined:
isNNN = f_idType(high) == 'Integer' // true = NNN, false = NNN.N0
WhatSaysTechCharts
@allanster, I mean if the stock day high price is like say 222 or 222.20 OR 333 or 333.30 all same digits excluding zero after decimal
allanster
@WhatSaysTechCharts, the solution to your question is outside the scope of this script's purpose and is a bit more involved. Please direct your question to one of the locations described at bottom here: tradingview.com/support/solutions/43000478425-i-m-trying-to-code-an-indicator-and-i-want-tradingview-s-team-to-help-me-with-it/
Más