Forum

How can I draw a trend line EA that simple joins the highest points of every candle from after the first six hours of a day

I want to write an EA that joins the highest points of each candle using a trend line (after the first six hours of a day) . I saw the the documentation for the trend line (https://docs.mql4.com/constants/objectconstants/enum_object/obj_trend). This is what I've done: ObjectCreate (chart_ID,name

Which folder should I place .mqh files to be recognised by my EA?

I created some .mqh files and left them in the Include folder (not a subfolder of the Include folder). I tried calling a class from the .mqh in my Expect Advisor but I keep getting a "undeclared identifier" error. Where should I place my .mqh files to be recognised by my Expert Advisor

How can I search .log file for string and place order from string?

Below are some logs from an indicator in the .log file: "2 01:02:27.235 Custom indicator #VISUAL ORDERS GBPJPY,M5: removed 2 01:02:27.237 Custom indicator CCI GBPJPY,M5: removed 1 01:05:09.372 Mail: invalid SMTP settings (Tools->Options->Email) 02:20:00.873 TopIndicator USDCAD,M5: Alert: USDCAD, M5

Is it possible to take a trade from an email signal?

I want to write an Expert Advisor that takes values (Stop Loss, Open Trade, Take Profit ) from an emailed signal and places an order. Can this be done? If yes, how can it be done

How can I hard code conditions/code to be executed once per bar?

I have been using the code below to prevent portions of my code from executing more than once per bar. How can I hard code a specific duration, say 5 minutes? Int BarsCount = 0; int start() { if (Bars>BarsCount) { //executed only once per bar BarsCount = Bars; } return(0); } Please pardon me, I'm

How can I code my Expert Advisor to take multiple trades?

I am a bit new to expert advisor coding. I have made an Expert Advisor (see attached file). It only takes one trade at a time though. There are several instances that the conditions for trade entry are met more than once but only one trade is taken at a time. How can I make it take more than one

How can I Make a Expert Advisor from this Indicator

I understand the basics of making an expert advisor and have seen some posts that mention that I should use iCustom function to access my indicator in an expert advisor, but it's not too clear. I want to make an expert advisor that takes a trade when the "X" and arrow appear at the same time, as in