Support Board
Date/Time: Sat, 15 Mar 2025 02:30:14 +0000
Post From: must recalculate the study to see correct values?
[2022-06-24 23:21:06] |
User133994 - Posts: 80 |
SC Engineers: I've isolated the issue. Now the study region only shows 2 subgraphs (below). And, the scale of region is displaying NaN for Subgraph_HH[sc.Index] =sc.GetHighest(Study1Array, lookback); Subgraph_LL[sc.Index] =sc.GetLowest(Study1Array, lookback); However, when I test with lookback =5; (yes, a fixed number); but even with this very restricted test setup, NaN is still appearing? And, yes, the study still repaints correctly in the region when I manually click the "recalculate" menu item...weird. Also, I have debug statements that show just valid floating point numbers being stored in each of the Subgraph_HH and Subgraph_LL arrays, these are clearly not NaN numbers? I've implemented the following debugging (including a NaN test): hhanswer =sc.GetHighest(Study1Array, lookback); llanswer =sc.GetLowest(Study1Array, lookback); if (Input_DetailedLogging.GetYesNo() && LastLogMessageIdentifier != 3) { LastLogMessageIdentifier = 3; DebugString.Format("hhanswer == : %f", hhanswer); sc.AddMessageToLog(DebugString, 0); DebugString.Format("llanswer == : %f", llanswer); sc.AddMessageToLog(DebugString, 0); } if (isnan(hhanswer)){ Subgraph_HH[sc.Index] = 0; }else{ Subgraph_HH[sc.Index] = hhanswer; } if (isnan(llanswer)){ Subgraph_LL[sc.Index] = 0; }else{ Subgraph_LL[sc.Index] = llanswer; } And it doesn't help!? The Subgraph_LL and Subgraph_HH both pass the isnan() test...and, yet, still paint NaN in the study region that is only isolated to Subgraph_LL and Subgraph_HH? Also, the debug strings are printing correct information (small portion shown below--[1158.0, 0.0, 1559.0, 0.0, ...] is printing while NaN is showing in the region?): Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | lookback == : 5 | 2022-06-24 18:52:01.073
Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | sc.Index == : 0.000000 | 2022-06-24 18:52:01.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | Study1Array[sc.Index] == : 0.000000 | 2022-06-24 18:52:01.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | hhanswer == : 1158.000000 | 2022-06-24 18:52:01.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | llanswer == : 0.000000 | 2022-06-24 18:52:01.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | lookback == : 5 | 2022-06-24 18:52:01.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | sc.Index == : 0.000000 | 2022-06-24 18:52:01.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | Study1Array[sc.Index] == : 440.500000 | 2022-06-24 18:52:01.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | hhanswer == : 1559.000000 | 2022-06-24 18:52:01.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | llanswer == : 0.000000 | 2022-06-24 18:52:01.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | lookback == : 5 | 2022-06-24 18:52:02.049 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | sc.Index == : 0.000000 | 2022-06-24 18:52:02.049 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | Study1Array[sc.Index] == : 0.000000 | 2022-06-24 18:52:02.049 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | hhanswer == : 1158.000000 | 2022-06-24 18:52:02.049 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | llanswer == : 0.000000 | 2022-06-24 18:52:02.049 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | lookback == : 5 | 2022-06-24 18:52:02.049 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | sc.Index == : 0.000000 | 2022-06-24 18:52:02.049 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | Study1Array[sc.Index] == : 628.000000 | 2022-06-24 18:52:02.049 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | hhanswer == : 1632.500000 | 2022-06-24 18:52:05.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | llanswer == : 0.000000 | 2022-06-24 18:52:05.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | lookback == : 5 | 2022-06-24 18:52:05.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | sc.Index == : 0.000000 | 2022-06-24 18:52:05.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | Study1Array[sc.Index] == : 0.000000 | 2022-06-24 18:52:05.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | hhanswer == : 628.000000 | 2022-06-24 18:52:05.073 Chart: Replay 60X: ESU22_FUT_CME [CV][M] 1 Min #4 | Study: DynHHLL v 0.09 | llanswer == : 0.000000 | 2022-06-24 18:52:05.073 Everything looks valid? Please help! Why is the study printing NaN in the region's scale while showing valid floating point numbers (i.e. 1632.50, 0.0, ...) in the debug log? Why does a manual "recalculate" from the menu fix it all--only after manually recalculating, the region displays the information shown in the debug log correctly--and the NaN displaying on the right scale...disappears (only to re-appear again when I modify any study parameter and hit the "apply" button)? Thanks in advance. Date Time Of Last Edit: 2022-06-26 00:02:32
|