[This message was posted by Witold Sames of Portware <w.sa...@gmail.com> to the "Algorithmic Trading" discussion forum at http://fixprotocol.org/discuss/31. You can reply to it on-line at http://fixprotocol.org/discuss/read/27d2ad5e - PLEASE DO NOT REPLY BY MAIL.]
Sergey, I am not sure about the validation expression with respect to the exclusive OR. From what I remember from school, XOR expressions return true if exactly one of two related expressions returns true (but never when both are true or both are false). I believe it may not even be necessary if your ATDL file had specified the related strategy parameter in a different manner, like the following example: <parameter xsi:type="String_t" uiRep="Premium - Discount" use="optional" name="PorD" type="14" fixTag="9999"> <enumPair uiRep="Absolute Premium" wireValue="Abs"></enumPair> <enumPair uiRep="Pct Premium" wireValue="PctPremium"></enumPair> <enumPair uiRep="Pct Discount" wireValue="PctDiscount"></enumPair> </parameter> That way, the user has no choice but to pick one of the choices. Validation can then be performed based on some other parameter, like disabling this drop down if no "price" has been entered, or making mandatory, etc. --ws > .. with 2 or more operands. > > XOR is interpreted as "Odd" function. It is "True" IIF odd number of > operands are true. Is that correct for ATDL? > > This is why I am asking, I received an ATDL file with a definition > like this: > > <val:StrategyEdit errorMessage="Please specify one type of Premium or > Discount"> <val:Edit logicOperator="XOR"> <val:Edit field="AbsPremium" > operator="EX"/> <val:Edit field="PctPremium" operator="EX"/> <val:Edit > field="PctDiscount" operator="EX"/> </val:Edit> </val:StrategyEdit> > > How would you interpret this? Using "Odd" XOR definition the validation > is passed when all 3 are set. [You can unsubscribe from this discussion group by sending a message to mailto:unsubscribe+100932...@fixprotocol.org] -- You received this message because you are subscribed to the Google Groups "Financial Information eXchange" group. To post to this group, send email to fix-proto...@googlegroups.com. To unsubscribe from this group, send email to fix-protocol+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fix-protocol?hl=en.