Forum

First time using iCustom for a Divergence indicator to include in an EA: Help needed

Hello all, I am trying to understand the logic behind iCustom function , but just can't. I am new to coding, I just started to learn, and got stuck here. My goal is to build an EA based on a simple MACD divergence indicator. The code is here

Net Position value function

Hi all, I am a new code learner and after finding almost everything I needed on MQL5 forums and help files, I cannot get out of a simple calculation. I open different volume buy/sell positions with the same Magic Number, and I want to calculate my net opened positions. My code is as follows: Please