A tick Expert Advisor. Comparing the price on the previous tick and the current price.
Attention! Tests only in the “Every tick based on real ticks” mode.
Author of the idea is Sergey Artukh, author of the MQL5 code is barabashkakvn.
Algorithm: two static variables:
static double prev_ask=0.0; // a static variable for storing the ask price on the previous tick
static double prev_bid=0.0; // a static variable for storing the bid price on the previous tick
static double prev_bid=0.0; // a static variable for storing the bid price on the previous tick
The static variable retains its value after leaving the function.
Input Parameters:
- the difference between the price on the previous tick and the current one
- loss of points
- reverse of signals
The most interesting parameter is the “reverse of signals”. Depending on the value (true or false) open at a signal either Buy or Sell.