dysong3 Posted July 26, 2024 Posted July 26, 2024 (edited) I am trying to create a script that checks if certain fields are empty. Can someone show me how to correct this script step that gives false positives? Testing this with Data Viewer gives the correct "0" if I terminate the script at (CONFIGURATION::Market_On_Close indication) but gives false negatives (1) if I terminate it at (CONFIGURATION::Quantity or later. I am testing this on records where all the fields have data. Is there a better way of doing this? IsEmpty (CONFIGURATION::Bar Interval) or (CONFIGURATION::Currency) or (CONFIGURATION::Exchange) or (CONFIGURATION::Market_On_Close indication) or (CONFIGURATION::Quantity or (CONFIGURATION::Security Type) or (CONFIGURATION::Start Time) or (CONFIGURATION::Stop Limit Parameter) or (CONFIGURATION::Stop Loss Parameter) or (CONFIGURATION::Symbol_) or (CONFIGURATION::Target Parameter) or (CONFIGURATION::Trade Direction) or (CONFIGURATION::Transmit Flag) or (CONFIGURATION::IBKR_account)) Edited July 26, 2024 by dysong3
comment Posted July 26, 2024 Posted July 26, 2024 (edited) Your calculation (not script) only tests if the CONFIGURATION::Bar Interval field is empty. Then it goes on to test if any one of the other fields evaluates as True if converted to a Boolean value (which any field that contains a digit other than 0 will). The simple way to test that none of the fields are empty (if that's what you are trying to do) would be: Count ( CONFIGURATION::Bar Interval ; CONFIGURATION::Currency ; CONFIGURATION::Exchange ; CONFIGURATION::Market_On_Close indication ; CONFIGURATION::Quantity ; CONFIGURATION::Security Type ; CONFIGURATION::Start Time ; CONFIGURATION::Stop Limit Parameter ; CONFIGURATION::Stop Loss Parameter ; CONFIGURATION::Symbol_ ; CONFIGURATION::Target Parameter ; CONFIGURATION::Trade Direction ; CONFIGURATION::Transmit Flag ; CONFIGURATION::IBKR_account ) = 14 Edited July 26, 2024 by comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now