Forum

Unable to add tooltip to OBJ_RECTANGLE object created with ObjectCreate

if (! ObjectCreate ( 0 , "Candle" + IntegerToString (i), OBJ_RECTANGLE , 0 ,candleStructure.mtime + multiplier,candleStructure.mopen,candleStructure.mtime + multiplier + 600 ,candleStructure.mclose)) Print ( __FUNCTION__ , ": failed to create candle body! Error code = "

Chart leaves Rectangle Object on the chart after deletion

I am trying to delete some chartobjects that I created. I am doing this in the onDelete(). There are 3 objects... 1. A rectangle 2. The other two are trend object. The two trend objects successfully gets deleted and removed from the chart. The rectangle is confirmed to be deleted but it stays on the

How to make custome enum available globally throughout my EA

I am trying to define a custome enum so that I can use it throughout my EA. e.g. if I have an enum like this: enum DIRECTION {BUY, SELL,BUYANDSELL} I want to be able to reuse this enum throughout the EA without having to declare it at every class file. I have tried definining it in one of the

How to obtain commission per lot in MQL5

I am trying to calculate lotsize for my EA - everything is fine except the commission per lot aspect. Does anyone have idea of how to obtain commission per lot in mql5? I have seen some EAs that developers are able to account for commission per lot for a symbol. Anyone there to help

Subscribed signal is closing the wrong trades!

I subscribed to a signal - I do notice that from time to time it closes the wrong trade and leave the right one in the system. For example, instead of closing the trade that was opened on 8/1/2020 it went to close the one that was opened on 28/8/2020. This has happened twice now. The more concern is