Login Page - Create Account

Support Board


Date/Time: Sun, 22 Dec 2024 03:31:06 +0000



Post From: Change plot style for current bar

[2014-12-22 23:19:00]
WarEagle - Posts: 73
Ok thanks, that worked great. Here is the code I used for anyone searching in the future.


//Subgraphs
SCSubgraphRef MyIndicator = sc.Subgraph[0];
SCSubgraphRef MyIndicator2 = sc.Subgraph[1]

then in SetDefaults...


if (sc.SetDefaults)
  {
    MyIndicator.DrawStyle = DRAWSTYLE_LINE;
    
    MyIndicator2.Name = "Current Value Plot";
    MyIndicator2.DrawStyle = DRAWSTYLE_POINT;
MyIndicator2.LineWidth = 3;
    MyIndicator2.DrawZeros = 0;
}

and then the plots...


MyIndicator2[sc.Index] = 0;
if(sc.Index == sc.IndexOfLastVisibleBar) MyIndicator2[sc.Index] = MyIndicator[sc.Index];

Hope that helps.