Expert Advisors and Automated Trading - page 147

[Deleted]
Hello, I have this code to get the GMT in second, it give warning that I convert from datatime to int, yes, I know that. How to get rid of the warning? Can someone please help? int GetGMTinSec () { return ( TimeTradeServer ()- TimeGMT ()); }
  Learning mql5  (4)
Hi Guys, im learning the basics at the moment just scratching the surface really, i learnt python a while ago so i get the concept i have printed to the experts tab figured out the basics of variables ect i want to add some text to the chart window from what i can see this is possible am i on the
  Py into ex5  (5)
Hello! I've just wrote a strategy in a python script. Is it possible to transform it form .py into .ex5 and use it as a EA? Thank you
  Mql5 OHLC, ATR  (2)
Hello, when i'm building EA sometime i get ATR/OHLC wrong values. After few attempt they start getting correct and they never becomes incorrect. I have no idea why exactly this happening. I'm guessing it happens when i change timeframe, or when EA is just attached to chart, somehow it needs to load
Hi all, I'm currently PositionInfo's pricecurrent to check my position for take profit and experiencing sever slippage will changing to symbolinfotick improves the situation? Is there any difference between these two method? if (position.PriceCurrent() - position.PriceOpen() >= tmpTP *
What i want to do: When there is a transaction request(whether it comes from a stop loss order, target price order, or EA), i need to run a function to check something.If the function returns true,i need to stop the transaction before the request has been executed. What i tried: Put my function at
How do I remove the auto trade and these blue and red arrows that appear
I have an MQL VPS server running, but it's producing no terminal or expert logs in the journals' viewer for the server
Is there an existing article or code or even an open code pinescript in which we can understand the mathematics and logics behind the concept and practical use of the so-called "currency strength" in a way possible to reproduce it in EA's or indicators
Now I need to write an EA that can trade in multiple symbols and multiple timeframes of each symbol. Preliminary ideas as follow: 1 Write only one EA, and the EA can normally place orders in multiple symbols and multi timeframes of them without interference. 2 Write one EA, which can only trade in a
Hi, I'm working to create a function to store current open position assets name and volume in multi currency pair situation. The actual value would be like this, string CurrPortAssets[] = { "AUDCAD" , "EURUSD" , "GBPJPY" , "USDCAD" }; double CurrPortLotSizes[] = { 0.1 , - 0.1 , 0.15
HI, everyone Please help to advise. My optimization too long waiting time, now MT5 agent can calculate at 27905 of 129024 steps use time feel day 20:42:52/95:44:21 time remain for 4 days (I think time 95 hour for my cpu 8 core right?) My laptop is core i7 2.8 MHz processor local 8 core agent, it
  Delaying an EA ...  (10)
Hi to all, Let's say I started Metatrader at 6 am in the morning, but I want my EA to delay until 7 am. In MQL 4 my code was ... while (TimeHour( iTime ( "EURUSD" , PERIOD_M30 , 0 )) < 7 ); But as there is no TimeHour function in MQL 5 it gets compiler error. How can I translate it in MQL 5? Thanks
Is it possible to start a strategy tester session without a balance row on the history tab
Hello, im new on EA´s i currently have one problem, my EA seems to not be running (not displaying any comments, and suddenly on certain symbols it starts working an not on others, attached my on tick code and a picture of 12 symbols running my EA and only some have the comments and are operating
I'm asking because for what I'm doing I'm worried about overloading the memory
Can I ask for advice from you guys? Sometimes my EA has the issue of placing two consecutive duplicate orders. Initially, I thought it was an error in my code, but when I checked my trading logs, I found that the duplicated orders did not have any corresponding trade numbers, and were not recorded
Hi Pros, i confused at function - AdjustBuyProfit its a grid trading system , i was thinking to find 3 profit trade that bigger than the biggest lost trade , close it together . its was fine when number of trade it less , but when its many trade . it get confused
Hi, I want to ask about how run a code once a day and here's the code that I used. Is this a correct way to do it? void OnTimer () { int hour = 00 ; int minute = 05 ; MqlDateTime ActivationTime; TimeToStruct ( TimeCurrent (), ActivationTime); if (ActivationTime.hour == hour &&
//+------------------------------------------------------------------+ //| Expert Advisor Template.mq5 | //| | //+------------------------------------------------------------------+ // Include
void EditOperationLine() { string search = "-> #" ; // trend text to find string str_iPonti; int iPonti = ObjectsTotal ( 0 , 0 , OBJ_TREND ); for ( int i = 0 ; i < iPonti; i++) { if ( StringFind ( ObjectName ( 0 , i, 0 , OBJ_TREND ), search, 0 ) > 0 ) {
Hello I was wondering about if timezone change is reflected in backtest please. Let say I want to trade us open which is at 1pm UK time but sometime it s change to 12 noon cause of time zone change. To have an accurate backtest based on is open backdated does it take time zone change into account
I'm asking this question because when I trigger a function, it prints a variable's value twice in my logs, and there is nothing in that function that can change the variable's value, it can only read it. But sometime today, the function printed two different values for that variable even though that
'}' - unexpected end of program KILANGIFX.mq5 174 1 '{' - unbalanced parentheses KILANGIFX.mq5 58 1 'CheckInputs' - undeclared identifier KILANGIFX.mq5 39 10 ')' - expression expected KILANGIFX.mq5 39 22 //+------------------------------------------------------------------+ //|
Hi, I have coded a multi symbol mql5 ea which compiles fine but when I run it through the strategy tester there seems to be an issue with the CopyBuffer function . Just by looking does anyone know why this might be? //Checking and Copying Indicator Values if ( CopyBuffer (MACD_Handle[i], 0 , 1 , 4
Hey there. Getting working orders sent thru but on occasion invalid price is showing up, it appears to retry and then will go thru. Ive seen the posts about ask/bid and assuming this is something simple that isnt registering for me mentally. That said ive made this simple EA to reproduce the issue
I am trying a fairly simple thing and failing miserably. Sorry for the long post but this got me scratching my head. Any explanation would be greatly appreciated. My advisor is supposed to draw some trendlines. I find some pivot points and store them in a CList called Pivots. No problem here. But
I'm trying to make my EA to open a single long trade ONLY when it crosses the 70 level. Unfortunately, it opens many buy orders. I did something wrong but I can't find the error. #include<Trade/trade.mqh> CTrade trade; void OnTick () { //creating an array for several prices double
I thought I downloaded the entire history of the EURUSD from History Center. The months go back to 1971, but the minutes will only go back until August of this year. When I try to run a test of the past 5 years, it only goes back 10 days and executes 2 total trades
I’ve seen a number of posts on setting up email here but none of them seems to give clear guidelines on the process. I am not sure exactly what each field in Options>Email should contain and how a simple email should be composed programmatically. I would really appreciate some help