Announcement

Collapse
No announcement yet.

EFS to add totals and display results

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

  • EFS to add totals and display results

    I had originally accidentally posted this thread in the wrong forum.

    Hello, I have made several attempts and spend hours over the last couple of weeks looking for a similiar EFS with no luck.

    This is what I am attempting to accomplish;

    I have over 10 slightly different conditions that I have written EFS's for.
    Can anyone assist me with the following;
    I am trying to determine from my 10 conditions how many of them are going UP verses going DOWN.
    I have created the following variables;

    var GreenUP = 0;
    var RedDN = 0;
    var GreenTotal = GreenUP;
    var RedTotal = RedDN;

    I believe the logic should work like so;

    if condition1 is green{
    GreenUP++;
    }
    if condition2 is green{
    GreenUP++
    }

    this would be continued up to the 10 total conditions

    if condition1 is red{
    RedDN++
    }
    if condition2 is red{
    RedDN++
    }

    this would be continued up to the 10 total conditions

    At the end, I need a method of displaying the totals
    I can use " SetBarBgColour(color.green);" to show the color I desire, is there a way to have the total number of up conditions using GreenTotal.

    In my scenario, where is the best place to put my variable, in function preMain, or function main ?

    Is it correct to use e.g. RedDN++ to add to the total ?

    What are the best ways to display the results on the chart, 1 for total reds and 1 for total greens ?

    If anyone can point me in the right direction, it would be greatly appreciated.
    Thanks in advance for any assistance.
Working...
X