I need help in creating a watchlist column that will show me how far is the distance between the current candle price,
to the previous candle hl2.
the end result will a percentage value, for example 39%, 80% and 100%.
100% will mean the current price and the previous hl2 are equal.
------------------------------------------------------------------------------------------
this is my plan:
1. to check if current price > previous hl2 or current price < previous hl2
if yes then
Option 1 - current price > previous hl2
Step1 - to reduce the current price with the previous hl2
current price - previous hl2 = [ here will be the value ] - we can define it as a "price_result_after_reduction_ver1"
option 1 - current price > previous hl2
option 2- current price < previous hl2
Step2 - to take result and calculate how much this value is in percentage from the value of the previous hl2
and then to create another value named - " price_afer_reduction_percentage_option1"
this value will be -
The result in % should be rounded
price_afer_reduction_percentage = [(price_result_after_reduction_ver1/previous hl2)*100]rounded
_________________________________________________________________________________________________________________________
Option 2 - current price < previous hl2
Step1 - to reduce the current price with the previous hl2
previous hl2 - current price = [ here will be the value ] - we can define it as a "price_result_after_reduction_ver2"
Step2 - to take result and calculate how much this value is in percentage from the value of the previous hl2
and then to create another value named - " price_afer_reduction_percentage_option2"
this value will be -
The result in % should be rounded
price_afer_reduction_percentage = [(price_result_after_reduction_ver2/previous hl2)*100]rounded
_______________________________________________________________________________________________________
I need help in putting it all together, or if there's another way to get the same result will be fine too.
thanks.
to the previous candle hl2.
the end result will a percentage value, for example 39%, 80% and 100%.
100% will mean the current price and the previous hl2 are equal.
------------------------------------------------------------------------------------------
this is my plan:
1. to check if current price > previous hl2 or current price < previous hl2
if yes then
Option 1 - current price > previous hl2
Step1 - to reduce the current price with the previous hl2
current price - previous hl2 = [ here will be the value ] - we can define it as a "price_result_after_reduction_ver1"
option 1 - current price > previous hl2
option 2- current price < previous hl2
Step2 - to take result and calculate how much this value is in percentage from the value of the previous hl2
and then to create another value named - " price_afer_reduction_percentage_option1"
this value will be -
The result in % should be rounded
price_afer_reduction_percentage = [(price_result_after_reduction_ver1/previous hl2)*100]rounded
_________________________________________________________________________________________________________________________
Option 2 - current price < previous hl2
Step1 - to reduce the current price with the previous hl2
previous hl2 - current price = [ here will be the value ] - we can define it as a "price_result_after_reduction_ver2"
Step2 - to take result and calculate how much this value is in percentage from the value of the previous hl2
and then to create another value named - " price_afer_reduction_percentage_option2"
this value will be -
The result in % should be rounded
price_afer_reduction_percentage = [(price_result_after_reduction_ver2/previous hl2)*100]rounded
_______________________________________________________________________________________________________
I need help in putting it all together, or if there's another way to get the same result will be fine too.
thanks.