Expert Advisors and Automated Trading - page 206

Hi guys, just a quick question: do I really have to call SymbolInfoTick every time before I use last_tick in the code to get updated quotes? Or is it sufficient to call it only once in the code and then just use last_tick without calling it again? Do I have to call SymbolInfoTick again in every
  Alert message  (2)
Hello I was wondering how I could get a string value for the symbol the indicator is loaded on and how to incorporate that into a message. if(!SendNotification("Buy Crossover Happened." ? "Potential Opportunity to trade coming up. Slope = "+maslope))
I got a sample from official website, the sample is pretty good. but every parameter of C# method is simple type, it is not a struct or class. so some methods have many parameters, it looks not good. i am trying to pass a class object as a parameter to a C# method, but still do not know how to do it
I am attempting to setup a always-on MetaTrader Client that can interact with my VPN. For this I need the ability to do the following with a script: Turn on the Client, Login to the Client, Configure the Expert advisors PUSH/PULL and REQ/RES sockets Any help? All I found was manual setup
Hi, Does anyone have any experience running EAs on the same MT5 platform but using multiple accounts? I saw in the options menu that you can disable expert advisors when switching the accounts... so if that option is there it means that you can set it up to allow EAs to trade
Hello everyone. I know this may sound a bit silly, but I have a very important (to me) question. If I buy an EA from MQL5 market , it is mine forever?I mean, even if the seller stops updates/stop selling the EA? Buying the EA I have it for "all lifetime"? Thanks a lot guys!
I trade US Futures Contract S&P mini and Nasdaq mini with AMPFutures broker. In backtesting I have not been able to retrieve MarketBook data (Depth of Market), so I am trying to see if that can be reconstructed by getting data using CopyTicks, but I doubt it is same. I tried to total Volume from...
Hello there! I'm trying to get ticks for some calc with CopyTicksRange function in EA (please,see code below). It works fine in real account, give the proper results. But when backtesting, it doesn't work. I'm currently working in Brazilian market with asset WING19. As I could understand so far, the...
Hi all, I'm trying to code a sample advisor based on Fractals but it's currently opening a single position, thus not closing (it should by opposite). I've coded this way: if (Spread<=MaxSpread){ if ( FRACTALS[ 1 ]< iLow (SName,WTimeframe, 1 ) &&BuyOrders< 1 ){ if
Hi ! Here's the error message I get using and indicator on a EA. It worked perfectly, then show that. Unfortunately, I restarted the terminal so I can't copy past the exact log. Anyone has experienced such an error ? PS : it worked 'til now.
After a issue with a privious broker i had to change to another broker. Now i moved the signal there and he is not copying the trades. Im wondering bas well because i change server and account and nowhere was asked for the password. So what do i wrong that the trades will be copied. Is there a
Hi I know that usually when you buy an EA you can run it on several accounts. Is there a difference when I rent an EA. May run a rented EA on more accounts
@William Nascimento @nicholish en @kei yakushiji @David Diez @Ahmed Ahmed @AHMED KHALIFA AHMED ABULFATEH ALI ABULFATEH Hi Programmers, am new in mql5 language and i was trying to make an EA that would calculate TotalProfits in History either Buy || sell Trades, even both ..... But ended up failing
//PSEUDO CODE Signals : at least 3 signals to monitor (could add up some later) confirmation signals: 2 signals // I created boolean functions to identify these signals // with ENUM_TIMEFRAMES and CandlePosition as input parameters TimeFrames : HigherTimeframe, MiddleTimeFrame, SmallestTimeFrame
Good morning you all, I wrote an Expert Advisor that opens order when all the condition I put meets. Analyzing that, I noticed a problem. When the condition meets it opens order, but if the order do not open because the free margin of my account it's too low (the reason of that is because I have
Hi, hoping to get some help with this. Please see my code below. So I have managed to return the data I want as shown below from the first "Print(_result);" I have the raw data as a returned object: However I was wanting to access specific parts of this object. I would have expected " Print
  Consecutive losses  (10)
Hello Guyz. I need help. For the last 10 months I've been working on creating my own EA. Happy to say I'm pleased with what I've done. I noticed however through back testing that sometimes for days I will will hit an almost endless stream of one loss after another. What I would like is to include a
Hi there, I am trying to find the highest & lowest closes for the last five bars in an array excluding bar 0. So far I have this. Can someone please double check this is correct. MQL5 // Create array of price data MqlRates priceInfo[]; // Sort array from current candle downwards
MT5 question Hi guys, I'm have a button on my panel and need to call FileFindFirst() to get handle of files in a folder when clicking on the button. everthing is good at mql4, buy I want to convert my source code to mql5. I don'k know why i can not get file_handle by click event. if I click on a
Hi All, I need help with This code, it compiles without Errors but when test it , it's not working . I hope you guys help solve this problem 😊 //+------------------------------------------------------------------+ //| Close All Positions At Certain Time |
Hi guy i have a piece of code that popup a confimation box for signals that is been generated by my EA, but it work good only when i press the yes button to open the trade. What i need is the way to ignore the signal when i press No, and let the EA to wait till next period before popping up the box
Hello to everybody! :) I'm trying to pass my EA from mt4 to mt5 but I 'm having problem with backtasting the code.. I've tickhistory, I've downloded the full histoy of EURUSD pair, I've create a custom symbol named EURUSD_tickhistory coping from the orginal EURUSD symbol and then imported all the
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...
hello folks , i have this function that i need to get the last position open price so that i can use it to create grid positions to my EA but the problem is that this function becomes very slow to show values when i print out to see if everything is okay ,and not only on printing the function does
Hello guys, I wanna iterate thru indicator buffers of different timeframes/periods and check for signals. #include <Arrays\ArrayObj.mqh> CArrayObj m_arr; //params for rsi indicator double RSI_M1[]; double RSI_M5[]; int RSI_handle_M1; int
Hello, I'm attempting to backtest an EA using optimization and getting these strange results: The first pass goes fine but then all following passes have huge (incorrect) profits. If I stop the backtest and double click on one of the bad passes and run it individually without optimization it works
Hello, I have several broker accounts, one on MT4, one on MT5 and planning to open another one on MT5. The reason I have many is so that I can run each one with their own Expert Advisor and partition/split my risk - If one EA blows up an account, it won't affect the other ones. I have about 3 VPS
Hi,  I try to program  a simple script.  My question: How do I get the value of the ATR (average true range) indicator in a script? I've found the function "iATR" (https://www.mql5.com/en/docs/indicators/iatr) but it does not return the current ATR value. Any ideas?   Thank you. Best, Chris 
Hey Guys, my issue is the following: I have an EA which has to send out messages via Telegram. If i put him on the chart he does everything right, sends the message out if specific paramters are valid. But if some candles go by and then its again valid, he doesnt send out a message, although he
I'm scouting for an EA to take a trade on the Moving Average of my choice in the time frame of my choice. Also, one that would close a trade upon a MA crossover. An alternative would be to send an alert upon crossing a moving average on a designated time frame. Thanks for any input