Expert Advisors and Automated Trading - page 231

Hello people! All right? When I change the timeframe of the graph, my EA triggers the invalid pointer error, currently I use many pointers, I noticed that with few pointers the error does not occur. I would like ideas and solutions for this situation. If I can keep working with the pointers better
Hi Guys, For my EA I am using Bool function criteria's with return True/False to meet Buy requirement for example: if(MATRUE (){ Buy(); void Buy(){ trade.Buy(sizeOfShare, NULL ,Ask,Ask-stopLossPips* _Point ,Ask+profitPips* _Point , NULL ); } Now I want to make the same function but then to close
Hi, I m new to mql5 and also for programming. I have a little problem I can't solve alone. I have written a little EA for buying or selling if a signal is occurred. For example: I wan't to buy once the price is obove EMA 20 and than the next trade should only be opened at the opposite direction when
bool Buy_Condition_1 = (maVal[ 0 ]>maVal[ 1 ]) && (maVal[ 1 ]>maVal[ 2 ]); // MA- 8 Increasing upwards bool Buy_Condition_3 = (adxVal[ 0 ]>Adx_Min); // Current ADX value greater than minimum value ( 22 ) bool Buy_Condition_4 = (plsDI[ 0 ]>minDI[ 0 ]); // +DI greater than -DI
FILE_SHARE_READ and FILE_SHARE_WRITE do not work proper. MQL creates buffers with different contents for the same file. Please watch the example. It´s one of these "Sometimes bugs". If you cannot provoke the shown output, play around with the lines, add more FILE_SEEKs or change the filename. If you
image (function 01)-how I wrote the code image (tester 01 - tester011) mt5 strategy tester - I can't make a good calculation between (profit + swap) It always calculates some negative value for me, regardless of whether the position is positive. thank you!!!!! function code !!! long
Hi How can i  get profit of last deal?
When I subscribe to a signal provider it deducts $30 from my account, and when I unsubscribe due to slippage, I get a message warning "If you unsubscribe $30 will be deducted from your account" ! I checked my bank account and MLQ5 actually charged me $60 ! But I can see extra $30 in my "balance" , I
I am developing a MT5 multisymbol EA. I get the message "No more than 1000 symbols can be selected" What statements substitutes a "selection" How do I "Deselect" a symbol? I am working with all the majors.
hi i started to get familiar with grid trading on one this i can found is grid average tp formula for the main trade and the trades when it's go to opposite direction can someone help me? thanks
My EA won't place any trades when I backtest it, just comes up with "failed market sell 0.03 GBPUSDme sl:1.40524 tp:1.40024 [invalid request]. Not sure why, it should open a buy trade when the 1H 50 EMA is above the 1H 200 EMA, the 15M 50 EMA is above the 15M 200 EMA, when there is a bullish
Hello, The question is basically in the thread title: Is there a way to use my graphics card along with my CPU for backtesting and optimization? If possible, I guess this would hugely benefit the computation time of the optimization sets. I couldn't find anything about this on Google. Anyone know
Dear the mql5 master coder. I need help with coding mql5 that doesn't work. Here is the code. Mql4 work smoothly: double LOSS( int m) { double a= 0 ; for ( int cnt = OrdersHistoryTotal()- 1 ; cnt >= 0 ; cnt--) { if ( OrderSelect (cnt,SELECT_BY_POS,MODE_HISTORY)) if (OrderSymbol()
Hi!, So i am knew to mql5 and coding in general and i was not able to find a conclusive answer for my question. The thing is, when i use: input double takeprofit = 200; or input int takeprofit = 200; my backtest results returns the same, but when i use Fast genetic based algorithm the
  Invalid Stops  (13   1 2)
2016.07.16 18:16:23.479 2016.07.14 23:59:00 failed market sell 0.02 EURUSD sl: 80.00000 tp: 50.00000 [Invalid stops] Good afternoon! I just finished to code my EA and I insert a fixed SL and TP, I stared with values like 20/25 and I tought the error was the small number, so I tried 80 and 50, as...
Dear coders i need coder for my EA
Hello everbody... I found this code here... but it doesn't work to MT5... Does Someone knows how to do the equivalent code for this? #import "user32.dll" int RegisterWindowMessageA( string MessageName); int PostMessageA( int hwnd, int msg, int wparam, string Name); void keybd_event( int
hello is there any way to make the sleep indefinitely? actually i am running two EAs on 2 different charts and first ea is only needed during the first few seconds of initialization, after that i dont need that Ea anymore i know " ExpertRemove (); " function but it removes the EA , i dont want it
  New Deal Error  (8)
hello I am going to test my strategy and I got error 4014 for opening new deal, Kindly let me know, bool Trade( int direction, double volume, double PivotStoploos) { ZeroMemory (Request); ZeroMemory (Results); ZeroMemory (Check); Request.action = TRADE_ACTION_DEAL ; Request.symbol
[Deleted]
I tried several ways, using if (LastAccountBalance <AccountBalance ()) {do something}. But I couldn't do it at all ... I already have the EA, which I coded myself, I just want to know how or what I would use so that if the last order is Loss the next order will set the TakeProf the same amount of
I'm new and I'm trying to move forward. Please help me. 1) I want to open only 1 position for this signal using "if function " but I couldn't. :( 2) I have more than one signal. and I have a separate shutdown signal for each signal. So I think I need to record the ticket number and I need to
  Load(import) dll  (4)
How import/load and unload a dll in expert(EA). If you have a source code or example please upload
Hi, I have a problem with my EA. It's calculateting the 21,13 and 8 eMA and it should give a Buy signal if the 8 - 13 - 21 are on top of each other in this sequence and a Sell signal if they are beneath each other. I hope that you get what i am trying to say. The thing is it works if i check for a
//--- input parameters input int StopLoss= 30 ; input int TakeProfit= 100 ; input int ADX_Period= 8 ; input int MA_Period= 8 ; input int EA_Magic= 12345 ; // Ea majic number input double Adx_Min= 22.0 ; // Minimum ADX Value input double Lot= 0.1 ; // other
Hello I am new to all of this. I have a trading strategy I am looking to automate but I need to make sure of something first. Can you code custom position sizes based on the amount you have in a trading account? Such as 1.3 % of your account size? Thanks
[Deleted]
MetaTrader Trading Platform Screenshots EURUSD, H1, 2020.05.30 GT247 (Pty) Ltd, MetaTrader 5, Real trailing stop should be less than take profit
Hello folks, Is there anyone have tried this? Could anyone show me a part of an example code? I'm coding an EA using 5 minutes chart and depending of the conditions, it will open new orders. As a result all the orders time are opened by multiple of 5 minutes: 0,5, 10, 15... But now, I'm trying to
Hi, I can't seem to get these events to fire. I'm trying to write to a file but it does not output and the Print() function does not output anything to the log either. If I place the same code in OnInit() it works fine and I find the file with the output. I am using a 4 core processor and no local
  Coding EA help!  (3)
Hello, i am still coding my EA but there are some questions that i wanna ask to you all because I am an amateur in this MQL5 language. Sorry for my bad english xD The questions are: 1) How to give a certain time interval for EA to execute buy or sell? Example: I activate the autotrading on
My brother and I built a BOT, it works awesome on his computer but does not work correctly on mine. It will not close out positions when it is supposed to and just does not seem operate correctly. We both are using Windows 10 and all our settings in the BOT are identical. Any ideas