Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Expert Advisor | Lucky

MetaTrader Experts, Indicators, Scripts and Libraries

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 Artukhauthor 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

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.
17277

Best MetaTrader Indicators + Profitable Expert Advisors