0
Follow
2
Followers
제가 경사도를 계산할 때, 미미네마는 차트에서 아주 부드럽게 보이지만, x가 너무 작기 때문에 좌표 축으로 계산하면 값이 엄청나게 커집니다.
이 문제를 해결하기 위한 대장님들의 대책은 무엇인가?
def 각 (v1):
bx = 3502 -3516
by = 4
angle1 = math.atan2(bx, by)
print(angle1)
angle1 = int(angle1 * 180/math.pi)
print(angle1)
14점의 차이가 있고, 경사도 매우 크고, 각도도 매우 크죠.
-1.2924966677897853
-74
Related Recommendations
Financial Magic Zone Global KOL RecruitmentFAQ Summary (Updating...)PINE Language Introductory Tutorial of FMZ QuantPrimary Tutorial of Strategy Writing with FMZ Quant Trading Platform (Must Read)Getting Started with FMZ Quant Trading Platform (Must Read)MyLanguage DocFMZ PINE Script DocNotes & Explanation of Futures Reverse Doubling Algorithm StrategySolutions to Obtaining Docker Http Request MessageExtending Custom Template by Visual (Blockly ) Strategy Editing
Comment
All comments (12)
def 角度(v1,取长):
r = _C(exchange.GetRecords)
数据长度 = len(v1)
数据长度 = int(数据长度-1)
取长 = int(取长)
dx1 = v1[数据长度]
dy1 = 数据长度 + 1
dx2 = v1[数据长度-取长]
while dx2 is None:
取长=取长 - 1
dx2 = v1[数据长度-取长]
dy2 = 数据长度 - 取长
bx = dx1 -dx2
#by = dy1 -dy2
by = zhou*2
angle1 = math.atan2(bx, by)
angle1 = int(angle1 * 90/math.pi)
return angle1
4 years ago
- 1


