Pinescript - exporting data in real-time vs starting from scratch.

Discussion in 'Automated Trading' started by Sprout, Dec 28, 2022.

  1. Sprout

    Sprout

    'sup folks,

    I've been using drawing templates extensively on Tradingview and am looking to level up to become more automated. My knowledge with coding on pinescript stopped at v2 for many of the things I was attempting to do, the script was not developed enough.

    Currently, using the drawing tools manually and looking to codify my logic. Pinescript now has the ability to export data as CSV's and the following is a hack exporting a limited dataset in real-time using the alerts function.




    For all the codewarriors here that are more familiar with Pinescript (and also) python. What are my pros and cons of staying with pinescript as it's familiar or bucking up and learning python from scratch and working with data directly?

    I understand that python would be more versatile but am daunted at the aspect of starting from square one.

    Also, what are some good fast-track references to get one up to speed fairly quickly in either of the two languages? I'm definitely out-of-the-programming loop.
     
  2. M.Carlo

    M.Carlo

    oh Man... let it go. Tradingview is a nice little game, very nice but still a toy.

    If you want to create or automate your strategies you need to use professional software! Real professional!

    With pinescript you cannot develop medium complexity strategies because "the platform was not born to do this", and this is the answer that the customer service gave me when, years ago, I was trying to understand why my strategies were not executed or often sent orders when they shouldn't even though the tests worked.

    I'll give you an example of a strategy, not real, but to make you understand what I mean:
    Buy at breakout of the weekly highest-high BUT ONLY if the ADX indicator is lower than 35 and if the bar close of yesterday was lower than the open (red candle)... these 2 simple conditions are sufficient to send the tradingview brain to mush! and see literally random orders! and in this world error=lost money!

    I went there before you, and I don't wish you waste time like I did with a toy, beautiful but still a toy. Buy a professional software and go! I hope to be proved helpful. Hello
     
    Sprout likes this.
  3. Sprout

    Sprout

    Useful comment.

    TV has also introduced objects, don’t know how much you’ve stayed up with current developments.

    From my understanding, your example strategy would be implementable now.

    There is still a latency delay though from getting data directly.
     
  4. M.Carlo

    M.Carlo

    my personal thought : buy professional software and you will discover that programming strategies is infinitely simpler than using pinescript, you will discover that your strategies will do what you want them to do without ever missing a beat, you won't have to spend days understanding why despite the conditions, the your strategy didn't activate or because it activated when it shouldn't!
    With pro software you work like a pro. You have a lot of pro tools. And of course you need a pro infrastructure : rent a server, pay for historical data, buy the software, but hey dude it's your money... do you prefer to invest it in SERIOUS tools or do you really think you can get the same results with free games?

    leave tv to the kids who play to do gordongekko
     
  5. SteveH

    SteveH

    Given that no proprietary software code is ever independently audited, I'll assume, out of my own personal concerns, that most "pro software" logs all of your executions independent of which brokerage you're connected. I won't argue the point. As always, "ignorance is bliss".

    If you have some skills, write your own autotrader or at least start from publicly available code. Example, look at ranaroussi's Python autotrader library. It's a very good start if your broker is IB:

    https://github.com/ranaroussi/qtpylib

    However, I suspect the most architecturally rewarding autotrading project would be built from Erlang/OTP/Elixir. You get the distributability, redundancy and robustness issues solved "for free".
     
    Last edited: Jan 20, 2023
  6. Sprout

    Sprout

    I ‘m not here to argue. I appreciate your opinion, even though, based upon my DD and experience I disagree with it.