I have a school project (due this Friday) and I'm stuck on an MT4 EA. It takes my SL and TP perfectly - just not my Entry. I made the TA for it first and it prints the RIGHT results to my screen, but it won't work correctly for the EA. I can't figure out why? Anyone here want to take a look. Its a
[Deleted]
Hi, I've been using <Deleted> for sometime now. I think it is good, BUT, I want to backtest a strategy that uses loops in the code, and believe it or not, but you can't write loops using <Deleted> language! So, I started looking for other backtesting software, preferably for free, I found and...
Hi there, I tried and tried to get the open date of the previous year. Can you help me please ? Now, i do it like this but, it's not "pro" datetime PREV_YEAR_OPEN_DATE=D'2017.01.001 0:00'; datetime PREV_MONTH_OPEN_DATE=iTime(Symbol(),PERIOD_MN1,1);datetime PREV_WEEK_OPEN_DATE=iTime(Symbol()...
[Deleted]
I finalised Kim's indicator. Took into account swaps, point value and spread
Hello friends, I´m working in my EA estrategy, if someone has these indicators for MTF. I will be enormously grateful
Hello all, Can anyone pls help me to check out where is the problem with my EA? It open some trade where the condition set is not met.Below is the attached file of my code Appreciate your help. Thank, Newbie
Hi guys, In my project I'm using an OBJ_RECTANGLE_LABEL object to draw a fixed position rectangle. It works fine, but I have a problem. When I open and close positions with my expert advisor, these methods draw arrows and lines on the chart (that's normal). When those objects get my fixed position...
I'm able to run my script just fine in the debugger, and I figured out how to change the time period and pair because the default was the EURUSD 1H. Everything works fine in the debugger, but it won't execute in my demo account. //+------------------------------------------------------------------+...
How to put my custom volume indicator on main chart? Is there any built-in function to do this? I read the documentation but i didn't find any explanation and example.
Hi First of all, if you have already replied to similar questions, then please accept my apoligies, but then it would be really helpful, if you could send a link to your previous reply, as I've not been able to find any similar questions on your site. I just upgraded to MT4 build 646, where after I...
Dear experts, Would you please advise on how I could improve the execution accuracy of the following orders: Problem: Some of the orders are left unfilled, i.e. "The 2" position hits its stop-loss at the level of "The 4" but "The 4" positions are not opening and sometimes "The 2" closes but "The 4"...
[Deleted]
MT4 giving me an error 130. Here is the code: ticket_order = MarketOrderSend(Symbol(), OP_BUYSTOP, Lot(lot_size), ND(Ask+Distance*MyPoint), 10*int(MyPoint/Point()), ND(Bid-StopLoss*MyPoint+Distance*MyPoint), It places a BuyStop oder but without Stop Loss and Take Profit (error 130). What am I...
Hi all, As I use the "Open prices only ...) to backtest my EA, it ends just in a second and there is no any result. But if I use the other two 'Every Tick' and 'Control points ...', it takes much longer and I can see the results. Why?
Hi, is there any special syntax to override parent functions? or is not possible if they are not "virtual"? Thanks !!
Hi there, I need you to know if it's possible to force a subwindow pixel height (and not percent height). I see this documentation, but, there is no example to do what I want to. https://docs.mql4.com/chart_operations/chartgetinteger Can someone help me please ? Regards.
[HELP] "CHARTEVENT_OBJECT_CLICK" - OBJPROP_STATE Is Always Returning 0 (False) - I used OBJ_LABEL to Create Wingdings For Fixed Position.. Bug? I clicked the wingdings but ObjectGetInteger(0, "show_buff_obj"+0, OBJPROP_STATE); is returning Boolean value is 0 (false).. It should be true when clicked...
Hello there, I am creating a buttons panel, so far is so god, but whent i am trying to aatach zoom function to my zoom buttons, I get this bug : The timeframe buttons do not released, and i cannot erase a template, when i want to save it. Here is my code (What is wrong please ? ) : long...
I have a buffer array named JPY_Band[] and another named CHF_Band[]. I want to subtract the value in the first index from the value in the first index of the other. Something like this double result = JPY_Band[1] - CHF_Band[1] this is not giving me what I expect. In fact it's not returning anything....
Hi, everyone. I'm wondering if someone can help me on this. Suppose I need to open a 112 lot buy trade while the broker only allows max 50 lots in a single trade. So I need to break up into 3 trades 50 lot, 50 lot and 12 lots. the following code does not work and I don't know why. In back test it...
To say that I am puzzled is an understatement. I removed all the Buy Sell and Exit conditions from this EA, Ran the Strategy Tester and it still makes trades. It seemed that no matter what trading conditions I entered weird trades would take place, beginning and ending at random. Oblivious to the...
Hello everyone, I don't understand what I have done to course error - constant expression required. Please enlighten me double MAW= iMA(Security,Timeframe,Preiod,MA_Shift,MODE_SMMA,PRICE_WEIGHTED, SHIFT);double MAT= iMA(Security,Timeframe,Preiod,MA_Shift,MODE_SMMA,PRICE_TYPICAL...
Hi, I am just programming an EA and I have been reading the documentation I found: https://docs.mql4.com/files/fileopen As far I know (I am not an experienced programmer), FILE_SHARE_WRITE (or share read) must be used when a file is accessed from multiple programs, right? My EA automatically exports...
Can any one explain? the OrderSelect, OrderType and OrderClose functions am I using correctly ? I want to close a trade when the new high comes. if(OrdersTotal()>0 && OrderSelect(ticketBuy,0,MODE_TRADES==true) && OrderType()==0) { //bool...
Check here this person giving coding lessons on mt 4, 30 lessons in all, from what I've seen so far he is a very good teacher.This will get you to lesson #29, but once there you will see the rest
Hi. I would like to ask the following: 1. Init - does something that you want the EA to do as it is loaded in the chart. If that is so, why does this not prompt the Hello world upon load of the EA? int OnInit() { return(INIT_SUCCEEDED); Print("Hello World"); } - Why do the following errors...
How to Put Object VLINE Under Candle To See the Upper/Lower Shadow of the Candlestick? I want to make Vertical Line under the candle to see clearly the shadow/tail of candles or Is there any way to avoid hitting the candlestick? There should be one—and preferably only one—obvious way to do it. (Zen...
Please can anyone point out what is wrong in this part of code below, it is showing "array out of range" and pointing that the error is on this line: datetime time = Time[0]; datetime getLastTradeTime(int type){ datetime time = Time[0]; for(int cnt = OrdersTotal()-1...
Hi Guys, i`m struggling upon something - its an add lot function. Can you help me make it start only one additional order per main order? Mine starts like a million additional orders. I`d really appreciate the help. Best Regards
Is it possible to code an EA for MT4, which would trade on the real as in the tester using control points?
(90 1 2 3 4 5 ... 8 9)
Wherever I searched the forum, I could not find information on this issue, as if no one had thought about it. If there are such opportunities in coding or have any ready variants of code which will allow to do so - please advise. :) Thanks in advance
Hi, I'm a bit confused with the "lots" unit, is there any way to get the total amount in USD or current currency for some order position? I know we can get the OrderOpenPrice() and OrderLots() but I don't know how to use it. For example, if OrderOpenPrice is $100 and OrderLots is 0.1, what is total...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.