Support Board
Date/Time: Sun, 19 Jan 2025 20:47:01 +0000
Post From: howto break(for) loop at first bar in history?
[2018-04-30 08:45:14] |
TedMar - Posts: 190 |
hmm, the (for)loop count bars from latest (Current Bar right in chart) to left bar in chart (first bar in history sc.index == 0). But howto check first bar after increment before starts next loop? I tryed example : sc.AutoLoop = 1; .... ... //LOOP for (int i = 1; sc.Index == 0 && MovingAverage1[sc.Index -(i)] > MovingAverage2[sc.Index -(i)];i++) { sc.Subgraph[0][sc.Index - (i)] = [sc.Index - (i)]; // fill arrows between Avg1 > Avg2 } |