Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal


Lucky - expert for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

Published by:
Vladimir Karputov
votes: 16
2017.03.02 09:56
Lucky.mq5 (13.59 KB)view

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.


Translated from Russian by MetaQuotes Software Corp.
Original code:

SimpleTrade SimpleTrade

Comparing open prices of the zero and third bar.


Derived from the NRTR indicator, provided with a new visual display.

21hour 21hour

The Expert Advisor places two pending orders at a certain time.

Money Fixed Margin Money Fixed Margin

An example for calculating the lot value with a fixed margin level. That is, if you specify 10%, a position with the margin equal to 10% of free margin will be opened.