
等级: 标准版
- 注册:
- 2022-10-26
- 曾用名:
|
# 绘制笔结构 for stroke in self.strokes: start_date = self.data.index[stroke[1][0]] end_date = self.data.index[stroke[2][0]] if stroke[0] == 'up': plt.plot([start_date, end_date], [stroke[1][1], stroke[2][1]], color='blue', linestyle='--') else: plt.plot([start_date, end_date], [stroke[1][1], stroke[2][1]], color='gray', linestyle='--')[color=rgba(0, 0, 0, 0.9)] # 绘制趋势线(示例绘制最近2个信号点连线) if signals['FG0'].iloc[current_bar] and signals['FD0'].iloc[current_bar-1]: PlotLine(symbol, (df.index[current_bar-1], df['Low'].iloc[current_bar-1]), (df.index[current_bar], df['High'].iloc[current_bar]), color=COLOR_YELLOW)前面PYTHON代码中的划线,绘图等指令在金字塔如何实现可视化标记[color=rgba(0, 0, 0, 0.9)]极点连接线的绘制方式
|
|