Forum

Custom indicator fails to load on main chart but loads successfully in strategy tester

Something strange happening. I'm attaching my EA to the main chart but it throwing error saying cannot load custom indicator 4802 It runs perfectly on strategy tester with no issues I've searched the forum but can't find a similar problem. Below is the attachment of the EA and indicator TDI auto is

Programming logic

Please i need help with logic. I created an ea to buy sell but I'm finding it hard to get the logic right. my problem is when I use all conditions inside of if statement it doesn't work properly on chart To validate buy; Green line <= 32, Green line must go below red line , Green line below blue

Help with pointers, and returning arrays

I wrote this function which returns two arrays, but i had to define it as a pointer. It's throwing me errors please can anyone help me here

The Holly grail of trading robots

Now let me make this clear. What I'm about to share is not the Holly grail. In my 2 years of trading, using indicator combinations, and learning different strategies. I've finally come to the réalisations that the fundamental force driving the markets is liquidity. It can further be broken down but

Indicator compiles with no error but shows nothing on chart.

I converted this indicator from mt4 to mt5 it compiles with no error but on chart it only shows a buffer and that's all. Doesn't print anything. Below is the actual mt4 source code and MT5. I can't use the code insert button else it would exceed maximum characters

Converting mql4 to mql5

I've been trying to convert an mql4 indicator to mql5. I've successful changes the code it compiles and runs but the indicator doesn't display on chart. I do get a buffer showing in the data window no error logs anywhere so I'm pretty much confused at this point how to move forward Below is some

Handling Array out of range

Is it a good practice to set a random large size for your arrays, I'm converting an indicator from mt4 to mt5, the code compiles with 0 warning ⚠️ and 0 errors. But the expert tab screens array our of range. I don't seem to understand exactly what's wrong. What's your advice on this

Invalid Stop Loss && Take profit

Please can anyone help me with this error Ive tried using the CTrade class to modify sl and TP using the trade method, and PositionModify method but it keeps throwing me this error on the tester Heres the src code //+------------------------------------------------------------------+ //|

Robot opening trades in a loop

Hello, //+------------------------------------------------------------------+ //| MatrixKiller.mq5 | //| Copyright 2023, MatrixKiller | //| |

Cannot load custom indicator iCustom function

I'm trying to get values from a custom indicator into my Ea but i'm getting errors. I've compiled the indicator with name "tmp" saved in the path MQL5\indicators. Here is the Ea source. //+------------------------------------------------------------------+ //|