how i can see chart or plot data #10
-
i can run script without problem """
@pyne
"""
from pynecore import Series
from pynecore.lib import script, close, ta, strategy, plot, color, input
@script.strategy("MA Crossover Strategy", overlay=True)
def main(
fast_length: int = input.int(9, title="Fast MA Length", minval=1),
slow_length: int = input.int(21, title="Slow MA Length", minval=1)
):
# Calculate indicators
fast_ma: Series[float] = ta.sma(close, fast_length)
slow_ma: Series[float] = ta.sma(close, slow_length)
# Generate signals
buy_signal = ta.crossover(fast_ma, slow_ma)
sell_signal = ta.crossunder(fast_ma, slow_ma)
# Execute strategy
if buy_signal:
strategy.entry("Long", strategy.long)
elif sell_signal:
strategy.close("Long")
# Visualization
plot(fast_ma, "Fast MA", color=color.blue)
plot(slow_ma, "Slow MA", color=color.red) but how can i check chart or plot data |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It is by default in your "workdir/output/" in "[your script name].csv` file. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
It does not draw charts atm. But you can generate from the data if you need. It has color option because of Pine Script compatibility. We have a compiler which compiles Pine Script into PyneCore. Without these it won't be compatible. Also you can use that data if you want, sometimes color values are part of the logic, etc. |
Beta Was this translation helpful? Give feedback.
It does not draw charts atm. But you can generate from the data if you need. It has color option because of Pine Script compatibility. We have a compiler which compiles Pine Script into PyneCore. Without these it won't be compatible. Also you can use that data if you want, sometimes color values are part of the logic, etc.