Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 06 20:51
    pre-commit-ci[bot] synchronize #702
  • Feb 06 20:51
    pre-commit-ci[bot] edited #702
  • Feb 06 20:51

    pre-commit-ci[bot] on pre-commit-ci-update-config

    [pre-commit.ci] pre-commit auto… (compare)

  • Feb 03 22:11
    Andrei-Pozolotin commented #707
  • Feb 01 00:22
    agronholm closed #707
  • Feb 01 00:22
    agronholm closed #705
  • Jan 31 23:22
    agronholm closed #704
  • Jan 31 23:22

    agronholm on master

    Fixed SQLAlchemy 2.0 compatibil… (compare)

  • Jan 31 22:55
    agronholm commented #704
  • Jan 31 22:37

    agronholm on 3.10.0

    (compare)

  • Jan 31 22:34

    agronholm on 3.x

    Updated actions (compare)

  • Jan 31 22:31

    agronholm on 3.x

    Fixed compatibility with SQLAlc… Dropped support for Python < 3.6 (compare)

  • Jan 31 13:01
    Andrei-Pozolotin labeled #707
  • Jan 31 13:01
    Andrei-Pozolotin opened #707
  • Jan 30 23:54
    santhanam87 commented #705
  • Jan 30 20:35
    pre-commit-ci[bot] synchronize #702
  • Jan 30 20:35
    pre-commit-ci[bot] edited #702
  • Jan 30 20:35

    pre-commit-ci[bot] on pre-commit-ci-update-config

    [pre-commit.ci] pre-commit auto… (compare)

  • Jan 29 22:34
    agronholm commented #705
  • Jan 29 22:33
    santhanam87 labeled #705
Alex Grönholm
@agronholm
ok, what's the prob then
gorgeousharrison
@gorgeousharrison
sorry
in the add_job, i have passed the FUNCTION NAM ARGUMENT
Alex Grönholm
@agronholm
?
so explain the problem you have now
gorgeousharrison
@gorgeousharrison
its telling me its missing the (dfex2) argument, but then when i run the code with it, the kernel dies
Alex Grönholm
@agronholm
you do realize that every time it runs INDI(), it adds a new job
and tries to start the scheduler again
gorgeousharrison
@gorgeousharrison
didnt quite get that. i just ant this indicator to start calculating veryday at the same time and repeat. didnt think it would be this comples
i made this dataframe a one trading session one, so its easy to get around. so technically it should only do the job once
Alex Grönholm
@agronholm
well, the scheduler runs the INDI() function every day at 9, right?
gorgeousharrison
@gorgeousharrison
exactl
Alex Grönholm
@agronholm
and that code includes instructions to add a new job to do the same
gorgeousharrison
@gorgeousharrison
hu
Alex Grönholm
@agronholm
so every day it adds another job for INDI()
gorgeousharrison
@gorgeousharrison
hum
Alex Grönholm
@agronholm
so after the first day you have two jobs for running INDI()
then the next day it runs it twice and you have four jobs then
then 8 jobs, 16, etc.
gorgeousharrison
@gorgeousharrison
ok, thats why the kernels dying
what am i doing wrong
Alex Grönholm
@agronholm
trying to add a new job in the target function
gorgeousharrison
@gorgeousharrison
the scheduler portion of the code
Alex Grönholm
@agronholm
do it elsewhere
gorgeousharrison
@gorgeousharrison
ok
one argument that migh be missing is the number of max instance, i want the next day to override the past one
Alex Grönholm
@agronholm
meaning?
gorgeousharrison
@gorgeousharrison
so it calulates the indicator from 9 am to 9 am the next day, ends the job and starts a fresh one
Alex Grönholm
@agronholm
if it works 24 hours a day, with the same parameters, what do you need a scheduler for?
gorgeousharrison
@gorgeousharrison
alex, i may be extremely green at coding, but i have a very precise thing i need the code to do: run a function periodically on any decided period. so right now im just starting the basic, which is get the fucntion to run everyday at 9. i want to be able to run the same function every 2 days at 5pm for instance
Alex Grönholm
@agronholm
I just want to understand what you are trying to do, and that seems to change every time I ask
gorgeousharrison
@gorgeousharrison
it does not. its just one simple thing.
Alex Grönholm
@agronholm
so you keep saying, but this is the first time I'm hearing about "every 2 days at 5 pm"
is that the actual end goal here?
at any rate, you should move the scheduling code out of the target function
gorgeousharrison
@gorgeousharrison
no. the goal is the function to execute from different start times at different intervals. those are parameters i intend to change.
ok im im doing that now
Alex Grönholm
@agronholm
what determines the start times in the end?
gorgeousharrison
@gorgeousharrison
i do
Alex Grönholm
@agronholm
I mean, do you just hard code them or do you fetch the values programmatically?
gorgeousharrison
@gorgeousharrison
for one strategy iwant it to start the job at 9 am, for another i want it start at 5pm
Alex Grönholm
@agronholm
"every 2 days at 5 pm" requires CalendarIntervalTrigger which is only available in apscheduler 4, still in alpha
gorgeousharrison
@gorgeousharrison
right now im trying to return the function starting anytime i chos
Alex Grönholm
@agronholm
I don't recommend that for general use
you can however approximate it with CronTrigger
gorgeousharrison
@gorgeousharrison
this is pretty much what ive been trying. lets consider 24hr intervals, that i can pick any time of the day to start the function
Alex Grönholm
@agronholm
24 hour intervals are easy
(assuming you don't actually mean exactly 24 hour intervals, but 23 or 25 are okay too)
gorgeousharrison
@gorgeousharrison
yes, for now that is all i need
Alex Grönholm
@agronholm
for that you already have the answer