0
Follow
2
Followers
Cuando calculo la inclinación, el plano de Mingmingema se ve muy liso en el gráfico, pero el cálculo con el eje de coordenadas es demasiado grande porque la x es demasiado pequeña.
¿Cómo pueden ustedes solucionar este problema?
def ángulo (v1):
bx = 3502 -3516
by = 4
angle1 = math.atan2(bx, by)
print(angle1)
angle1 = int(angle1 * 180/math.pi)
print(angle1)
Así que la diferencia de 14 puntos, la inclinación y el ángulo son muy grandes.
-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


