Expert Advisors and Automated Trading - page 71

I have been having a lot of difficulty trying to write the code needed to close all of the positions I am in if a certain signal appears . Here is the code that I have within my method: string symbol = Symbol (); ulong deviation = ULONG_MAX ; if (PositionClose(symbol, deviation){ Print
Hello, I am running into an issue where the profits showing in my "Optimizations Results" from a All Market Watch symbol test do not match the results of running a Single Test from one of the individual tickers. See below for my settings I am using on a "All Market Watch symbol" test for the sake of
I am not a coding expert, but I made a trading bot to enter and close trades based om specific rules, I tried test it in the strategy tester but it is not entering any trades. Can someone please help me to solve this issue ? Below is the code: // Input parameters input int fastMAPeriod = 7 ; input
Been having issues while compiling the code please help Here's the code: input double stopLoss = 1000 ; // Stop loss in points input double takeProfit = 2000 ; // Take profit in points input double lotSize = 0.01 ; // Lot size
I've been searching far and wide for a sentiment or real volume indicator to put in EA but to no avail. So, I want to attempt to make my own using tick movement but i dont kno how, like I've used the ticks per sec in formula block but i dont think thats enough to show real volume
Anyone know how to command EA to not trade today if there was a trade from other day that closed today
Hi, The specifications in general are as shown in the picture. The focus should be on Profit-currency, which is USD. This means, EURUSD traded with 1 lot means a change of 10 USD per pip. To calculate the final change per pip with the given account, I need to convert on top from the profit-currency
hew when optimizing and ea in mql5 what doe the section "result mean" optimization show good profit and good drawdown but results tab show all red.. looking to the below optimization wha the part i circled mean since the orther are showing profit
My EA is programmed to open a trade and close the trades in exactly 3 minutes time. The EA works perfectly on the strategy tester(Every tick based on real ticks) however it didn't work while testing it on demo, it keeps closing the trades after about a minute. I tried removing the iBars , but the EA
First of all, yes, I know there are thousands of similar posts here and I read it all (I think) and still haven't found a solution. Second of all, I am using the following approach to calculate risks: double ValuePerPoint() { // Minimal price change (?) double tickSize = SymbolInfoDouble
I have a spread variable/array and I want to apply bollinger bands to it, but I cannot figure out how to do it. I searched everywhere and the only info I found is how to apply the iBands indicator on another indicator's data. But I found nothing about how to apply it on a custom array. Can anybody
Hi! I have an EA which dynamically creates a SQLITE database (based on each new day) and fulfill its fields using only the available functions of MQL5 - there is no DLL involved. And also, the database is created within the TerminalInfoString(TERMINAL_COMMONDATA_PATH) , I mean, there is no special
I'm testing a multi stocks EA. When I run a single test, everthing works well and the EA consumes 2GB to run the entire history. When I active the generic algorithm, the MT5 was unable to run with "no memory" error. At the end, the MT5 says: "Tester 24 passes not processed and returned to task
This is problem on MQL5 I set ObjectSetInteger(0,".....",OBJPROP_LEVELCOLOR,.....); to fibonacci retracment object. But color not change. Check and fix it please. Thank you so much
Am trying to modify my trade when it hits stop loss But I don't know how to code the condition that clearly says that if(SymbolInfoDouble (Symbol(), SYMBOL_BID < stoploss); That's what I tried to do
Hi All, I have been optimizing Expert Advisors and I noticed it takes an awful amount of time to optimize them! It takes me few hours for a full optimization. I realized this has to do with my processors and RAM. Can you recommend me some PCs or specific processors or RAM specs I should look for? My
I am encountering really big differences when I use the optimized setups found from the strategy tester: - I ran the optimization and then "Run single test" on the most profitable inputs directly from the Optimization Results tab (right click on the top row). Here is the graph I get: - Then I set
hi guys, in screen shot below i uploaded my EA to market but still sent or check five hours ago What is problem
I am trying to make use of CMoneyFixedRisk class but it seems to be asking for a "StopLevel" which is expressed in "PriceLevelUnit" while my SL is calculated as a price value. Is there a way to convert my SL price and have the money management class choose the correct lot size
Hello everyone, I'm facing an issue with my trading script that I need your help with. My problem is that the script keeps opening repeated trades without closing them properly, especially during inappropriate times. Another concern is that the trade ticket numbers are increasing inexplicably."
Hello guys, No matter mql4 or mql5. Any success
hi there, it's the first time ever that i write in the forum, cause I'm totally new on it. but please , can anyone help me? i ll writhe dow the code and highlight in yellow where the errors is. thank you ... Improperly formatted code removed by moderator. Please EDIT your post and use the CODE
Comments that do not relate to the " General rules and best pratices of the Forum. ", have been moved into this topic
Hello dear community members, I'm facing an issue while writing an MQL5 script to access the profit and loss values of closed trades. In short, I've been trying to use the relevant functions to retrieve the profit and loss values, but I always end up getting 0.0 as the profit or loss value. I've
Does anyone know if there is any type of EA or Trade Manager that allows grouping of orders to see the individual Net P&L of multiple spread trades? Because when trading one spread pair (two instruments) it's okay, but when trading multiple spread pairs it becomes impossible to tell what the net
Hi, Have a code from standard library //snippet from a standard library module Expert\Signal\SignalMA.mqh with additional Compare() and LongCondition() class CSignalAMA : public CExpertSignal { protected : CiAMA m_ma; double MA( int ind) { return
Hello, I am trying to create an EA where the condition is : At the beginning, price is between support and resistant line. if price break resistant, then create only 1 Sell stop pending order price at middle of S/R. but if price back to between S and R price, and going up and break the resistant
Hey people, I want to create an Expert Advisor that trades on trending support and resistance like what's shown in the pictures below but I have no idea where to start. Can anyone provide some help? Thanks :)
Hi guys I'm writing an expert and I need it to stop opening positions and close all positions and orders 1hour before important news time how can I do it? I searched a lot, all is about using MQLcalendar but there is not such a file named "MqlCalendar.mqh" in my metatrader5 I tried to reinstall and
Hey, im following this guys tutorial and my code is not generating any buy signals or print statements saying that i should buy or sell even though i can clearly see that criteria is met. why do you think is going on here? I followed the guys code to the letter i believe. video