Login Page - Create Account

Support Board


Date/Time: Wed, 24 Apr 2024 18:38:31 +0000



Value not evaluated

View Count: 610

[2019-08-14 20:27:51]
User37462 - Posts: 31
Hi, I have spreadsheet study, Buy entry cell. Backtest.
If the formula is:
=AND ((E3>O3),(P3=1)) than P3 is not evaluated - why?
Formula details:
[ AND ] AND ((E3>O3),(P3=1)) = 0 (number, integer)
  [ > ] (E3>O3) = 0 (number, integer)
    [ E3 ] E3 = 3970.75 (number, double)
    [ O3 ] O3 = 4154.86872253418 (number, double)
  [ = ] (P3=1) = (not evaluated)

  
If I swap formula in the same moment to : =AND ((P3=1),(E3>O3)) than (E3>O3) is not evaluted -why?
Formula details:
  [ AND ] AND ((P3=1),(E3>O3)) = 0 (number, integer)
  [ = ] (P3=1) = 0 (number, integer)
    [ P3 ] P3 = 0 (number, integer)
    [ 1 ] 1 = 1 (number, integer)
  [ > ] (E3>O3) = (not evaluated)


Seems like it depends on the order??
[2019-08-14 21:02:46]
John - SC Support - Posts: 31087
Keep in mind that with an AND function all of the components have to be true in order for the overall AND condition to be true. Therefore, if the first component is false, then there is no need to continue to evaluate the condition, which is what you are seeing.

We added some information related to this to the documentation here:
Working with Spreadsheets: Viewing Formula Expression Tree
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-08-14 21:13:20
[2019-08-21 20:20:13]
User37462 - Posts: 31
Thank You!

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account