Unlocking the Power of OpenTicks: Your Go-To EA for MetaTrader 5

Mike 2017.01.20 01:57 19 0 0
Attachments

Meet the Minds Behind OpenTicks

Let's give a shout-out to the brains behind this impressive tool! The idea comes from Maksim Zerkalov, while the coding wizardry is thanks to barabashkakvn. Together, they’ve created a fantastic Expert Advisor (EA) for MetaTrader 5.

How It Works

OpenTicks makes its moves when a new bar appears, analyzing the previous four bars to determine the best trading strategy. Here’s a quick look at how it assesses the market:

   if(iHigh(1)>iHigh(2) && iHigh(2)>iHigh(3) &&
      iHigh(3)>iHigh(4) && iOpen(1)>iOpen(2) &&
      iOpen(2)>iOpen(3) && iOpen(3)>iOpen(4))
      BuyOp=true;
   if(iHigh(1)<iHigh(2) && iHigh(2)<iHigh(3) &&
      iHigh(3)<iHigh(4) && iOpen(1)<iOpen(2) &&
      iOpen(2)<iOpen(3) && iOpen(3)<iOpen(4))
      SellOp=true;

Managing Open Positions

Once you have a position open, the EA leverages the "HalfLots" variable to check if it can partially close a profitable trade. Here’s how that looks:

void TrailingStairs(ulong m_ticket,ushort trldistance)

If "HalfLots==true", the system knows it’s time to take some profits. Here’s the code snippet that does just that:

                  m_trade_partial.PositionClose(m_position.Ticket(),-1,half_volume);

This clever mechanism helps you lock in profits while still leaving room for more gains. It’s all about making your trading experience smoother and more profitable.

List
Comments 0