Announcement

Collapse
No announcement yet.

Performance Load

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Performance Load

    I am running a very basic formula that is causing my CPU% to increase substantially.

    I have attached the formula: 8-day.efs.

    I am a power user with multiple screens and multiple charts. I run with a page file with 8 open active charts, all configured the same. My system is one year old: Intel Core 2 Quad Core - 2.83Ghz (12MB Cache), Intel 1333Mhz FSB Quad Core Motherboard, 4GB Low Latency RAM, 74GB 10,000 rpm SATA Western Digital hard drive, Windows XP Pro with SP3.

    I monitored the CPU percentage for 2 hours during active trading. The first hour without the 8-day formula showed the CPU% constant between 0 and 3% with occasional spikes to 6-7%. The second hour was with the 8-day formula running on all 8 charts and the CPU% increased to 15-20% consistently with occasional spikes to 30%.

    On each of the 8 charts, the active studies are 5-SMA, 8-SMA, 200-SMA, Bollinger Bands, Stochastics, and Volume.

    The addition of the formula is the ONLY change I made. This is such a small and basic formula. Why does it cause such a drastic increase in resources required? I even tried to optimize it by using barstate logic to only process on a newbar.

    Thank you for your assistance.
    Attached Files

  • #2
    Re: Performance Load

    pjkowalski
    The reason for the increase in resources used is similar to the one explained in this thread and is because you are drawing a line at the absolute bar index -8 for each historical bar as the formula is loading in the chart.
    You only see one line because they are all set to draw on the same bar index -8.
    If you want to see the effect of this just replace
    PHP Code:
    drawLineAbsolute(-80, -8Infinity*1PS_DASH5Color.RGB(255,255,0), "line"+rawtime(0)); 
    with the following
    PHP Code:
    drawLineAbsolute(-8high(0), -8low(0), PS_DASH5Color.RGB(255,255,0), "line"+rawtime(0)); 
    and you will see that the resulting line will go as high as the highest High on the chart and low as the lowest Low on the chart (see enclosed screenshot)
    To avoid this just replace the current tagID ie "line"+rawtime(0) with "line" and only one line will be drawn at that location
    Alex




    Originally posted by pjkowalski
    I am running a very basic formula that is causing my CPU% to increase substantially.

    I have attached the formula: 8-day.efs.

    I am a power user with multiple screens and multiple charts. I run with a page file with 8 open active charts, all configured the same. My system is one year old: Intel Core 2 Quad Core - 2.83Ghz (12MB Cache), Intel 1333Mhz FSB Quad Core Motherboard, 4GB Low Latency RAM, 74GB 10,000 rpm SATA Western Digital hard drive, Windows XP Pro with SP3.

    I monitored the CPU percentage for 2 hours during active trading. The first hour without the 8-day formula showed the CPU% constant between 0 and 3% with occasional spikes to 6-7%. The second hour was with the 8-day formula running on all 8 charts and the CPU% increased to 15-20% consistently with occasional spikes to 30%.

    On each of the 8 charts, the active studies are 5-SMA, 8-SMA, 200-SMA, Bollinger Bands, Stochastics, and Volume.

    The addition of the formula is the ONLY change I made. This is such a small and basic formula. Why does it cause such a drastic increase in resources required? I even tried to optimize it by using barstate logic to only process on a newbar.

    Thank you for your assistance.

    Comment


    • #3
      Alex,
      Right on the money as usual. Thanks for the assistance.
      Phil

      Comment


      • #4
        Phil
        You are most welcome
        Alex


        Originally posted by pjkowalski
        Alex,
        Right on the money as usual. Thanks for the assistance.
        Phil

        Comment

        Working...
        X