Expert Advisors and Automated Trading - page 51

  EA trading  (1)
can you add new option to a ea if it is encrypted like attach a stop trade after 7 consecutive losses and if so is there anyone willing to add for cheap not i dont know how long it would take or pricing but i dont think it could be more the a couple lines of code or have so all ready made sorce code
Greetings, I did some testing with .ZOrder method in AppDialog, and I found out that no matter where I put the Button.ZOrder call, it does not set the ZOrder of the object actually, so I looked that part up in WndObj.mqh, and i saw that the virtual bool OnSetZOrder( void ) {
I practically know the name of the button of an EA not of my creation... When I ask for the list of components, I get the name of the button for example the button named "btnX" I would like to use one of my scripts to "click" that button to execute the operation of that EA type --> click ( btnX ) is
i have an EA, codeA.ex5 i have made all the necessary checks but this EA fails the automatic validation with errors(no trading operations ) for all the test pairs when i copy the exact code and paste and compile with the same editor to codeB.ex5, this code passes the validation with no errors then
Hi, does anyone know how to get the candle close from a non time based custom chart such as renko ? iClose and Copyclose doesn't work. thanks
Hi all. I've had an EA developed which uses two time frames, ie a higher time frame requiring conditions be met, and a lower timeframe for execution. The strategy tester, and even backtest is running extremely slow - 131 of 1280, in 9 hours - with the full test taking 89 hours. Even when running the
Hi All, I have written the code below as an attempt to create a function that limits the number of open positions by closing either the oldest or least profitable depending on input settings, the code compiles however when I run it on backtest I get an error message saying array out of range on line
Sometimes I want the fast genetic optimization to test for many more possibilities than it does. I have a small neural network that seemingly has tons of local minimums. For each weight it could find a good value that it gets closer to but there is a much better negative value that it doesn't test
Hello! I have a question. I have this array of a struct type, I would like to fill the data from an indicator buffers. I tried like this : for ( int i = 0 ; i < array_size; i++) { CopyBuffer (handleHH, 3 , 0 ,array_size,dir_primery[i].close); CopyBuffer (handleHH, 2 , 0
so ive tested for some time now with mt5 and recently as soon as i press ''start'' on the strategy tester, my computer just freezes up to the point i cant even move my mouse. the computer i have is a hp desktop ryzen 5 which im 90% sure can deal with the processing power needed so im almost certain
Hi all, could you give me a tip on how to get the current bar in python using the MetaTrader5 library? I'm trying prices = mt5. copy_rates_from ("EURUSD", mt5.TIMEFRAME_M5, today, 10) but this doesn't return the current bar, as it seems to have a delay of 2 hours. how could i do day trade without
  Handle release  (6)
Hello! I have this function in my include file : double ATR( int index) { double atr[]; int handle = 0 ; handle = iATR ( _Symbol , PERIOD_CURRENT , 14 ); CopyBuffer (handle, 0 , 0 , 10 ,atr); ArraySetAsSeries (atr, true ); return NormalizeToTickSize (atr[index]); } So at any time in
Here's my code const double myVol = 0.1 ; ulong myTicket = 0 ; MqlTradeRequest request = {}; MqlTradeResult result = {}; ulong SendTradeRequest() { if ( OrderSend (request, result)) { return result.order; } else { Print ( "Error: " , GetLastError ()); return 0 ; }
Hello all, I'm struggling already for several days with how to draw objects within Expert Advisor in MQL5. First goal is to draw objects and have them visible within Strategy Tester. I searched and read various articles in the forum, but still, it's not clear to me what is the logic behind drawing
Hello guys, I really need help in implementing trailingstop in my bot. I want when the trade is opened, if it is a buy trade it follow the price by 45 pips and if it is a sell it; there is no error in my code but for some reason the strategy is not implementing in the tester. See my code below, i
Hello Community, I let my EA run live on 18.October EURUSD and it lost 1,66% Then I let my EA run backtest in Meta Trader 5 (Strategy Tester) on data of 18.October EURUSD and it won 1,30% Modeling is based on real ticks. Delays are in both cases ~1ms (live run of my EA is on VPS). Even if I increase
I want to run Expert Advisor daily for one hour in demo account. Is it possible to run python script as a cron job and executes Expert Advisor for one hour ? Also, if metatrader5 resides in different server from cron job then is it possible to connect to MT5 from python script
Does anyone know of an expert/ utility that i can use to auto close an order after it has been open x minutes & x hours
Greetings to you all can any one please help me i have been bugged by this error for quite some time now: 'CopyRates' - no one of the overloads can be applied to the function call here is the code: MqlRates oneHourCandleAgo; if ( CopyRates ( _Symbol , onehourtf, 0 , 1 , oneHourCandleAgo
Hi guys, I'm a beginner (mt5) and trying to understand how I can apply an ea to multiple charts without them interferring. Every time a buy order is open on a chart it gets closed by the ea triggering a sell on another pair, same happens for SELL->BUY. Any idea on why this may happen
Hey, im trying to get the Slope of an iMA in percent. I have read multiple posts here but non of them seem to work or im missing out on something (probably last option) I think it doesnt have to do with my code structure, but my math. Heres my code in the OnTick function: double
Am trying to adjust parameters on an EA I just downloaded. When I started installing it, the EA requires right clicking on the chart (or pressing F7) to get to the parameter menu. Am using a Mac Book Pro, Normally, I can Control Click on the Mac to replicate a right click but it's not working. Nor
Can an expert advisor lose state over the weekend when market is closed since there are no ticks coming in? For example, when I have a boolean flag to Keep track of something that was set to true on Friday and we go into the weekend with the variable still holding value "true" , when market opens
I have a neural network with various indicators as inputs. Is there a way I could code in a huge lookup table so each tick I could look up the value instead of calculating them every time? Does mt5 do this already internally? Could I do this in ontesterinit()? Is there a function to get the start
[Deleted]
  Error 5040  (6)
Im getting Error 5040 since recent update on MT5 All program were working fine om previous build and my mt5 version is 4016 It includes CustomTicksAdd function
Hi, I'd like to add a symbol to an array when trade open on that symbol. I looked to ArrayFunction() and the only function to add value to an array is using ArrayFill but it is not supporting a string. I tried using CArrayString class but failed to understand how to work with it. From the
Hello dear developers. I ran into a problem when the customer's global variables are automatically deleted after restarting the terminal. Because of this, the adviser does not work correctly. But I do not have such an error, and I have not encountered this before. At the same time, we have the same
Can anyone please assist me on how to get the LOT-size changed utilizing ExpertMAMA?
Hi I tryed to show the value of moving averge, I used this: double maValueH4 = iMA ( _Symbol , PERIOD_H4 , 50 , 0 , MODE_SMA , PRICE_CLOSE ); double maValueH1 = iMA ( _Symbol , PERIOD_H1 , 50 , 0 , MODE_SMA , PRICE_CLOSE ); double maValueM30 = iMA ( _Symbol , PERIOD_M30 , 50 , 0 , MODE_SMA
Hello, Can someone come up with a mql5 code that would delete the new position if it is the opposite type/ trading direction from existing position? Thank you