PriceJump

Indicates the last unusual price deviation in historical and live price data (Zorro 1.76). Automatically set by calling a price or contractUpdate function. Can be evaluated in scripts; afterwards reset it to 0 for 'arming' it for the next price deviation detection.

0 - No price jump since the last reset.
1 - Price outlier, see below.
2..10 - Stock split by the given factor, f.i. 4 for a 4:1 stock split.

Type:

int
 

Outlier

Sensitivity factor of the outlier detection for historical and for live prices (default = 1+2*sqrt(BarPeriod/1440)). All outliers above the given factor or below its reciprocal are suppressed with a 0.01 EMA factor. For instance, Outlier = 1.15; suppresses all outliers that deviate from the last price by more than 15%. PriceEvent is set to 1 when an outlier was detected.

Type:

var
 

Example:

function run()
{

  Outlier = 1.05;  // detect and suppress price deviations by more than 5%
  if(PriceEvent >= 2) { // stock split detected 
    printf("\nStock split %i:1 - cancelling open contracts",PriceEvent);
    for(open_trades) cancelTrade(ThisTrade);
    PriceEvent = 0;
  }
  ...
}

See also:

tick, TickTime, price

 

► latest version online