Forum

Test a For loop

Have a look at this simple test-script: int start() { int k=0; int p=50; for(int i2 = 0; i2 < p; i2++) { for(int i3 = 0; i3 < 5 ; i3++) { k = i2+i3; Print(k); } } return(0); } As long as p is smaller than 50 the first value of k is 0 (zero) as it should be. But if I make p larger than 50 the first

Problem with 3SMA's

3 SMA's: 30, 50, 100 4 TimeFrames: 30, 60, 240, 1440 What I try to find is the direction of the SMA's for these Time Frames. The first and second TimeFrame is right but the third and fourth is wrong! I can't find the bug. Anyone? #property copyright " Copyright 2005, MetaQuotes Software Corp. "