Skip to content

how i can see chart or plot data #9

Description

@amirssahmadi

i can run script without problem
for example this one

"""
@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
out put folder only generate text file

Activity

  1. wallneradam commented on Jul 1, 2025

    @wallneradam
    Contributor

    It is by default in your "workdir/output/" in "[your script name].csv` file.

  2. amirssahmadi commented on Jul 1, 2025

    @amirssahmadi
    Author

    It is by default in your "workdir/output/" in "[your script name].csv` file.
    so it doesnt generate chart ? why plot having color option if it just generate number?
    or i need run other code to see chart ??

  3. wallneradam commented on Jul 1, 2025

    @wallneradam
    Contributor

    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.

  4. locked and limited conversation to collaborators on Jul 1, 2025
  5. converted this issue into a discussion #10 on Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions