0
Follow
2
Followers
斜率を計算すると,明明エマはグラフ上は平らに見えますが,座標軸で計算すると,xが小さすぎるので,計算値は大きくなります.
この問題に対する解決策は,大<unk>さんたちです.
def 角度 (v1):
bx = 3502 -3516
by = 4
angle1 = math.atan2(bx, by)
print(angle1)
angle1 = int(angle1 * 180/math.pi)
print(angle1)
傾きと角度がとても大きいです.
-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


