[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changing the relation of the input value



PureBytes Links

Trading Reference Links

Hello everyone,

I'm trying to do something simple, but I can't figure out the code...
I want to code a variable, that will make every consecutive number in an 
input raise the wanted value by two. For instance: I have an indicator that 
uses the RSI in one of its calculations. When applying the indicator I'll 
get an input : RsiVal (1), where 1 is the value for the RSI. Now what I 
want is that if I enter 2 as the value, it will actually read it as 3. 3 as 
5, 4 as 7, 5 as 9 etc. Meaning each consecutive number actually raises the 
RSI value by TWO. Is there any way to do this?

TIA

Philip