Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 05:32:28 +0000



Post From: ACSIL programming assistance request

[2024-01-05 07:46:38]
User431178 - Posts: 541
Your code from the first post works fine when you remove the startindex variable (it defaults to 0 anyways).
See attached image.


/*==========================================================================*/
SCSFExport scsf_ZigZag111(SCStudyInterfaceRef sc)
{
  SCSubgraphRef Subgraph_ZigZag1 = sc.Subgraph[0];

  if (sc.SetDefaults)
  {
    sc.GraphName = "ZigZag11";

    sc.AutoLoop = 1;
    sc.GraphRegion = 0;

    Subgraph_ZigZag1.Name = "ZigZag1";
    Subgraph_ZigZag1.DrawStyle = DRAWSTYLE_LINE;
    Subgraph_ZigZag1.PrimaryColor = RGB(0, 255, 0);
    Subgraph_ZigZag1.DrawZeros = false;

    return;
  }

  float ReversalPercent = 0.5 * 0.01f; // change here for now as req

  sc.ZigZag(sc.BaseData[SC_HIGH], sc.BaseData[SC_LOW], Subgraph_ZigZag1, ReversalPercent);


  SCString MessageString;
  //MessageString.Format("Subgraph_ZigZag1 %f sc_Index %d" , Subgraph_ZigZag1, sc.Index);

  MessageString.Format("Subgraph_ZigZag1 %.02f sc_Index %d", Subgraph_ZigZag1[sc.Index], sc.Index);

  // sc.AddMessageToLog(MessageString, 0);

  sc.AddMessageToLog(MessageString, 0);
}



below is the last 3 lines of my message log

It's no good looking at only a few message entries, and there are clearly values in the subgraphs as otherwise the image previously attached would have no lines present.
Date Time Of Last Edit: 2024-01-05 07:49:05
imagezigzag.png / V - Attached On 2024-01-05 07:43:48 UTC - Size: 35.93 KB - 58 views
imagelog.png / V - Attached On 2024-01-05 07:49:02 UTC - Size: 85.98 KB - 70 views