Support Board
Date/Time: Fri, 23 May 2025 00:35:44 +0000
Post From: If statement not working
[2023-09-23 00:29:32] |
User373245 - Posts: 51 |
Is there an issue using the S1ValArray[sc.Index] format in an if statement. currentPrice, S1ValArray[sc.Index] and S2ValArray[sc.Index] all go to the log correctly (the logging is not in this code) but this logic puts false in the log?????? The timing of it all is as should be, current price is > S1ValArray[sc.Index]and < S2ValArray[sc.Index] if (currentPrice > S1ValArray[sc.Index] && currentPrice < S2ValArray[sc.Index]){ sc.AddMessageToLog("Condition is TRUE", 1); } else { sc.AddMessageToLog("Condition is FALSE", 1); } |