Giter Site home page Giter Site logo

Comments (7)

xmatthias avatar xmatthias commented on July 16, 2024

Well without actually knowing where you suspect that the problem is (or what problem you're encountering) - it's pretty difficult to say.

One thing that i can see from afar is that the way you implement it will be very slow, as it's looping through the whole dataframe - but at first glance - for no good reason (it could be probably vectorized by using appropriate pandas calls).

from technical.

kaanguven avatar kaanguven commented on July 16, 2024

Well without actually knowing where you suspect that the problem is (or what problem you're encountering) - it's pretty difficult to say.

One thing that i can see from afar is that the way you implement it will be very slow, as it's looping through the whole dataframe - but at first glance - for no good reason (it could be probably vectorized by using appropriate pandas calls).

I guess the problem is in for loop, I'm undecided whether to use a for loop for the avg value

from technical.

xmatthias avatar xmatthias commented on July 16, 2024

Well if i'm honest, i dont' see a question in any of your comments.

it's just a "this is code, this is my converted code" ... but if there's no actual question - then there's no actual response.
Please understand that i'll not be debugging random code without even knowing why or what to look for.

from technical.

kaanguven avatar kaanguven commented on July 16, 2024

Well if i'm honest, i dont' see a question in any of your comments.

it's just a "this is code, this is my converted code" ... but if there's no actual question - then there's no actual response. Please understand that i'll not be debugging random code without even knowing why or what to look for.

the question is : "According to pinescript, the output in my python code is wrong, what am I missing?"

from technical.

xmatthias avatar xmatthias commented on July 16, 2024

Well - most likely, precise understanding of how the indicator should actually work?

Pinescript seems simple at first glance, but really isn't, and i find it never really clear if something is a series or a value/scalar - as that can somehow change throughout time iirc.

Can you define (in words, not code) how the indicator should actually work?
Without that understanding, the attempt to convert it to a different language will certainly fail.

from technical.

stash86 avatar stash86 commented on July 16, 2024

Just to add one thing for you to consider, have you ever consider that maybe the pinescript's result is the one wrong?

from technical.

kaanguven avatar kaanguven commented on July 16, 2024

Just to add one thing for you to consider, have you ever consider that maybe the pinescript's result is the one wrong?

No 100% sure it works fine.

from technical.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.