Forum

Little help to correct code for a simple trade counter indicator (almost working)

Hello al, I have this code for an indicator that should display the number of manually opened trades during a particular time span, however it gets stuck to 0. I'm using hedging mode and the orders are opened manually. The script compiles without errors however, the totalTrades is always 0. I'm not

Where is the mistake in that simple code please ? (MQL5)

Hello all, I've made this simple indicator from the Heikin Ashi template of Metaquotes and added some code to plot 2 EMAs calculated from heikin ashi close price and to plot bullish and bearish cross over signals from the two EMAs. However when I modify the code (pasted below) to change appearance

Optimization and combinations of opening conditions, is there a simple workaround to my problem ?

Hello all, I'm trying to run an optimization procedure to easily go through all my opening conditions, which are numerous, and check which combination of opening conditions are the best. For that I just used boolan inputs and added a additional conditions in buy/sell conditions as you can see in

Why is my PC crashing running this simple EA ?

Hello, Please could you tell me why my PC is crashing running this particular EA from which you have the code inserted below ? All others EA I tried run fine, there is a particular problem with this one, which has been generated using ChatGPT. Be careful if you run it in your computer as it surely