Support Board
Date/Time: Wed, 27 Nov 2024 04:46:47 +0000
Post From: If statement not working
[2023-09-23 00:29:32] |
User373245 - Posts: 42 |
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); } |