Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

[bug] redundant loop causing slowdown -> hang -> lockup #2389

@hotmatrixx

Description

@hotmatrixx

So i've been playing with a new strategy for a while, it's worked perfectly for a seek or so while testing. purchase every time, on point, no issues.

Today I added one of my Money Management Strategies to it, and it hung - identically to how my apps were recently.

So, I broke my bot down step by step, and I think I found the culprit, which I'll share here; I found a couple.

#1 nested mathematic operations. It hates them, venomously.
I just plugged some random values into this to make my point (this is NOT a valid strategy)
Capture

#2 BEDMAS. oh yes, it hangs on bedmas.
a= b(c+d) - (e-c)/d
has to be broken down into separate lines with extra variables to account for the intra steps:

f=c+d
g=e-c
h=g/d
i=b*f
j=g/d
a=i-j

else it will hang within 10 trades. When you're on 3 minute markets, I don't like taking 1/2 to find out something is wrong with my code.. when it's actually NOT my code.

#3 reticulated arguments;

I come from BASIC, so I have a habit of doing this:

(set) a=a+b
but it no likey.

I have to go

set c=a
set a=c+b

I had all those operations in my MM system. so it was hanging on each of those systems. it had to be stretched out and broken down into it's simplest, step by step form.

As a benefit, my bot uses 8% of my CPU instead of a steady 80%

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy