Login Page - Create Account

Support Board


Date/Time: Sat, 08 Feb 2025 21:42:32 +0000



Post From: Zigzag Reversals with ACSIL

[2020-07-24 15:19:20]
User40794 - Posts: 2
For anyone looking for something similar in future, here is what I did.


Create a subgraph reversal and run a for loop


  for (int i = 0; i < 200; i++)
  {
    if ((Subgraph_ZigZag[sc.Index - i] < Subgraph_ZigZag[sc.Index - i - 1] && Subgraph_ZigZag[sc.Index - i - 1] > Subgraph_ZigZag[sc.Index - i - 2]) ||
      (Subgraph_ZigZag[sc.Index - i] > Subgraph_ZigZag[sc.Index - i - 1] && Subgraph_ZigZag[sc.Index - i - 1] < Subgraph_ZigZag[sc.Index - i - 2]))
    {
      Subgraph_zzRev[sc.Index - i - 1] = Subgraph_ZigZag[sc.Index - i - 1];
    }
  }


This will index Subgraph_zzRev with reversal points.


then create Arrays that will hold reversals n-1, n-2, n-3 and so on.