Forum

Creating library file and reference it

Hello Everyone, I am traying to create my own library and referring to it from my EA code under MQL4\Libraries I have my amrBungees.mq4 and the ex4 which include my functions under \MQL4\Include I have amrBungees.mqh #import "amrBungees.ex4" short yellowBungee(); short greenBungee(); short

Error 4002 while calling OrderCalcProfit function, any hint please

ResetLastError (); double total= 0 ; double profit= 0 ; for ( int i = 0 ; i < PositionsTotal (); i++) { if ( PositionSelectByTicket ( PositionGetTicket (i))) if ( PositionGetSymbol (i) == Symbol ()) { if (( ENUM_POSITION_TYPE ) PositionGetInteger (

incorrect start position ArrayMinimum function, please help !

Hello everyone, Attached an indicator code which give very good signals for the trend direction but as far as it runs it keep showing incorrect start position x for ArrayMinimum function I hope some one can direct me to solve this but without affecting the code or how it works, I didn't found any

ChartSetSymbolPeriod issue

Hello All, How to use ChartSetSymbolPeriod in back-testing for MT4 or this is not possible Regards, Amr

MACD Histogram for MQL4

Hello Everyone, Can anyone give me hint for how to get the MACD Histogram values? the bars <Image Deleted>

Market questions

Hello, If I published products to the market so I have some questions as a provider, 1. If a client rent my product for 30$ and then I changed the price to 50$, when the time comes to renew, he will renew for 30 or 50? 2. Is there a way to change my product/indicator title or I have to remove it

EA but without making trades, Exit strategy

Hello, I am making an exit strategy automation code, I started it as script but then thought that it much better to be EA to use OnTick() event handler but the problem is that it keep opening trades when I run it or when a trade is close !!!! I think this comes from auto generated code in OnInit()

OrderProfit() didn't return profit if it less than 1?

Hello Everyone, in my code I found that OrderProfit() just returned zero if the profit was less than 1 (0.02 or -0.04 etc.) So is there a way to let it show the exact profit value of a trade just like it showing up in the Trade tab? Thanks in advance

I can't believe it, can't edit/add comment on a trade

Hello Every one, Is it real that when I open a trade I can't put a comment on it? or edit already existing comment? I can't believe it