mablue

Trade Hour

mablue 업데이트됨   
This script is just finds the best hour to buy and sell hour in a day by checking chart movements in past
For example if the red line is on the 0.63 on BTC/USDT chart it mean the start of 12AM hour on a day is the best hour to buy (all based on
It's just for 1 hour time-frame but you can test it on other charts.
IMPORTANT: You can change time Zone in strategy settings.to get the real hours as your location timezone
IMPORTANT: Its for now just for BTC/USDT but you can optimize and test for other charts...
IMPORTANT: A green and red background color calculated for show the user the best places of buy and sell (green : positive signal, red: negative signals)

settings :
timezone : We choice a time frame for our indicator as our geo location
source : A source to calculate rate of change for it
Time Period : Time period of ROC indicator


About Calculations:

1- We first get a plot that just showing the present hour as a zigzag plot
2- So we use an indicator ( Rate of change ) to calculate chart movements as positive and negative numbers. I tested ROC is the best indicator but you can test close-open or real indicator or etc as indicator.
3 - for observe effects of all previous data we should indicator_cum that just a full sum of indicator values.
4- now we need to split this effects to hours and find out which hour is the best place to buy and which is the best for sell. Ok we should just calculate multiple of hour*indicator and get complete sum of it so:
5- we will divide this number to indicator_cum : (indicator_mul_hour_cum) / indicator_cum
6- Now we have the best hour to buy! and for best sell we should just reverse the ROC indicator and recalculate the best hour for it!
7- A green and red background color calculated for show the user the best places of buy and sell that dynamically changing with observing green and red plots(green : positive signal, red: negative signals) when green plot on 15 so each day on hour 15 the background of strategy indicator will change to 15 and if its go upper after some days and reached to 16 the background green color will move to 16 dynamically.

릴리즈 노트:
Easy way to use:
You can just wait for a green vertical background color to buy and a red bg color to sell :)

How to use it:
You see two lines (red and green) that them show you the best time to trade ( green for buy, red for sell )in UTC+0000 timezone! You should convert last values of this two line to your timezone for example:
If green line in 3.5 and I'm in Tehran city or Iran Country with this time zone(+4:30) I will add 4.5 hour on it : 3.5+4.5=8
This number means I will buy in 8:00 AM
IMPORTANT: 8:00 AM is Not exactly the best hour to buy! it's just mean that: must of positive changes average hour in past days happend on 8 on rsi and mfi indicators.

More Info:
This strategy based on idea of circular mean with atan2
Circular average calculation for 24 hour daily periods
This calculation is just for fixing normal average problem on 24 hour day periods for understanding what we want to do think to that: If we have two hours we want to average them to 24 but if we calculate it with normal mean the result will be wrong: (2+22)/2=12 we know that the periodic things will not average like that and we should use another method to calculate mean of this like numbers. In this article we use python coding to fix this problem and generate the realistic average of hours
We used normal mean(arithmetic mean) formula on Trade Hour V3 I don't update V3 to V4 cuz V3 still better than V4 but V4 works without negative and unknown results and have more standard formula than V3.

for more information see this links:
en.wikipedia.org/wiki/Atan2
en.wikipedia.org/wiki/Circular_m...
gist.github.com/mablue/4c27f920b...
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?