Seems a simple enough thing but I am stumped.
I can't seem to use Math.Max(mp,mp[1]) or Highest(mp,x).
} protected override void OnBarUpdate() { if (CurrentBar < 2) return; double mp= 0; double maxmp = 0; double temp = 0; if( EP > Stp )// long { mp = High[0] - EP; temp = High[1] - EP; maxmp = Math.Max(mp,temp);[COLOR="Red"]//**** only compares last 2 values[/COLOR] } else { mp = EP - Low[0]; temp = EP - Low[1]; maxmp = Math.Max(mp,temp); } string mystr =mp.ToString("N2")+ " / " + maxmp.ToString("N2"); DrawText("tag", false, " < "+ mystr, 0, Close[0],Color.Blue, new Font("Verdana Ref", 9), StringAlignment.Near, Color.Transparent, Color.Transparent, 50); }
Comment