Announcement

Collapse
No announcement yet.

efsInternal and nested loops dilemna

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

  • efsInternal and nested loops dilemna

    Howdy folks,
    I have a dilemna way beyond my scripting ability to solve and would appreciate any proceedures you might be willing to share/outline. Using efsInterval (1 minute interval) on a 60 minute chart, i grab a couple of values (Thanks again to Steve for his examples). Then on the same candle i used a loop to make calculations on those values to determine the optimal value of the loop variable to maximize points. I printed each candle's total and the variable value to a text file and then totaled them in a spread sheet sorted by that variable. This allowed me to get both the total points and the value of each variable associated with that total, over the entire chart.
    Now, however, i am trying to use 5 variables simliar to....

    grAmt = 2;
    while(grAmt <= 6){
    a = 0;
    while(a <= 10){
    b = 58;
    while(b >= 32){
    c = 10;
    while(c <= 40){
    d = 14;
    while(d <= 24){

    points = calculation based on 5 variables
    point_vars = grAmt+","+a+","+b+","+c+","+d

    d = d+2;
    }
    c = c +2;
    }
    b = b-2;
    }
    a = a+2;
    }
    grAmt = grAmt+2;
    }

    This gives me 18,900 answers on each candle, and given that i am running this over 5 months of data.... there is no way to write this to a text file and expect it to be loadable into a spread sheet as the file is HUGE.
    What i am trying to keep track of and the only information i need is the set of variables that generate the largest total over all candles and the specific total generated.
    Is there a way to do this or I am out to lunch as far as going at it in this direction?

    Thanks in advance,
Working...
X