Expressions in Adx language


The Aldexia software allows the manipulation of 2 types of data: Boolean (Boolean) and real numbers (Double).

The available Boolean operators are :
  • = : equality.
  • not : operator NOT.
  • and : operator AND.
  • or : operator OR.
The real operators available are :
  • + : addition.
  • - : subtraction.
  • * : multiplication.
  • / : division.
  • = : equality.
  • <> : not equal.
  • < : less than.
  • <= : less than or equal to.
  • > : greater than.
  • >= : greater than or equal to.
  • % : modulo.
  • ^ : power.
The available mathematical functions are :
  • abs(double) : absolute value.
  • sqrt(double) : square root.
  • exp(double) : exponential.
  • log(double) : Napierian logarithm.
  • log10(double) : logarithm (base 10).
  • cos(double) : cosine.
  • sin(double) : sine.
  • tan(double) : tangent.
  • acos(double) : arc cosine.
  • asin(double) : arc sine.
  • atan(double) : arc tangent.
  • atan2(double, double) : arc tangent.
  • cosh(double) : hyperbolic cosine.
  • sinh(double) : hyperbolic sine.
  • tanh(double) : hyperbolic tangent.
The available logic functions are :
  • crossUp(expression1:double, expression2:double) : true when the expression1 curve intersects the expression2 curve upwards.
  • crossDown(expression1:double, expression2:double) : true when the expression1 curve intersects the expression2 curve downwards.
  • sustain(expression:bool, double) : the "true" value is sustained for n periods.
The financial functions available are :
  • quotes() : quotation.
  • mavg(period) : moving average.
  • macd(fast, slow, signal) : MACD.
  • rsi(period) : RSI.
  • cci(period) : Commodity Channel Index.
  • adx(period) : Average Directional Movement Index.
  • plusdi(period) : +DI.
  • minusdi(period) : -DI.
Note: New financial functions are currently being developed..

Examples of expressions:
  • quotes() >= mavg(20)
  • quotes() < mavg(40) - 20
  • crossUp(mavg(50), quotes())
  • crossUp(mavg(20), mavg(30))
  • mavg(50) - mavg(20)
  • macd(12,26,9)>0
  • crossDown(mavg(20), mavg(30))
  • sustain(crossup(mavg(20), mavg(30)), 5)