Support Board
Date/Time: Tue, 26 Nov 2024 06:42:35 +0000
Post From: GetPersistentInt() help
[2024-01-01 20:43:42] |
User895355 - Posts: 55 |
Every session, London, New York, Asia, I draw the high and lows for the opening. Going back a month or so. If I want to display each session, then each Tool must have it's unique PersistentInt. My question is what is the best way to do this? Here is my code regarding that: // line numbers int &HighTool_LineNumber = ShowAll.GetYesNo() == 0 ? sc.GetPersistentInt(1) : sc.GetPersistentInt(currentDate); int &MedianTool_LineNumber = ShowAll.GetYesNo() == 0 ? sc.GetPersistentInt(2) : sc.GetPersistentInt((currentDate) * 2); int &QuartileUpTool_LineNumber = ShowAll.GetYesNo() == 0 ? sc.GetPersistentInt(3) : sc.GetPersistentInt((currentDate) * 3); int &QuartileDownTool_LineNumber = ShowAll.GetYesNo() == 0 ? sc.GetPersistentInt(4) : sc.GetPersistentInt((currentDate) * 4); int &LowTool_LineNumber = ShowAll.GetYesNo() == 0 ? sc.GetPersistentInt(5) : sc.GetPersistentInt((currentDate) * 5); I've been using current date which is int currentDate = sc.BaseDateTimeIn[sc.Index].GetDate();
Still some of my tools don't show. |