# Computations in FIXatdl

**URL:** <https://forum.fixtrading.org/t/computations-in-fixatdl/14200>\
**Category:** General Q&A\
**Tags:** fixatdl\
**Created:** [September 25, 2018, 1:07pm UTC](https://forum.fixtrading.org/t/computations-in-fixatdl/14200 "2018-09-25T13:07:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppanhotoftr](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@ppanhotoftr](https://forum.fixtrading.org/u/ppanhotoftr)\
**Post date:** [September 25, 2018, 1:07pm UTC](https://forum.fixtrading.org/t/computations-in-fixatdl/14200/1 "2018-09-25T13:07:01Z")

</div>

Hello,

I’ve read parts of the FIXatdl and it specified that it’s possible to conditionally enable or disable a field depending on the value of a second field. In an similar fashion, is it possible to compute a field value based on the values of other fields?

Thanks and regards,

Paulo

---

<div class="post-metadata">

**Author:** ![scott.atwell](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@scott.atwell](https://forum.fixtrading.org/u/scott.atwell)\
**Post date:** [September 25, 2018, 1:29pm UTC](https://forum.fixtrading.org/t/computations-in-fixatdl/14200/3 "2018-09-25T13:29:45Z")

</div>

FIXatdl has a “StateRule” that can be associated with the specified value for one control, and can set the value for a different control, however, that does not presently support mathematical computations.

---

<div class="post-metadata">

**Author:** ![rick.labs](https://avatars.discourse-cdn.com/v4/letter/r/5daacb/32.png) [@rick.labs](https://forum.fixtrading.org/u/rick.labs)\
**Post date:** [September 29, 2018, 3:18pm UTC](https://forum.fixtrading.org/t/computations-in-fixatdl/14200/4 "2018-09-29T15:18:50Z")

</div>

Although its pretty much an exercise in torture, there is a way to “compute” in FIXatdl. We specifically put into the standard Not-And (NAND). You can then use “helper controls” as temporary (disposable) registers.

The process would however be like writing in Assembler.

On the bright side, you can name a StateRule and call it later by name.

Beware however that just because its included in the standard doesn’t necessarily mean all implementations can handle it. (stack overflow for example)

Rick
