Expert Advisors and Automated Trading - page 217

Hi guys, i`m developing an EA and I need to know how much money I have available to open more positions. The idea is, if I have already a position open, I would like to know how much money do I have left to buy other stocks. I`m using, inside OnTick the AccountInfoDouble() method. While the first
Hi All, first post! I wanted some help understanding Classes and Objects in MQL4. I have a question around making correct usage of them. Is it possible to declare a Global Object from a Class as you can do with normal variables? I can create them OnTick and they persist until OnDeinit where I need
I have a strategy based on harmonic patterns like gartleys, crab, and some other customized patterns. I am thinking of learning python to hopefully implement my strategy. Would this be possible to program using MQL5 as well to create an algorithmic trading strategy ? Could I also be alerted of when
hi I am kind of beginner in coding , i try to code my first serious EA , i try to calculate the maximum value of an indicator at current candle not for previous candles i want to calculate maximum cci value on the current candle and keeps the value of maximum i tried to make a dynamic array which
I am a neophyte in MQL programming and have been trying to develop my own EA. It has a pretty good performance on Strategy Tester, but loses money when it goes live. This week was the ultimate test. I left it running for the whole week in a demo account and it lost money consistently, every day
Hi, I'm having a problem with my EA and I would like some help with it. I developed an EA that places a limit buy order when the asset price reaches a determined price. For instance: if Asset A reaches 10.00, the EA will add a limit buy order at 9.50. As I'm using this strategy on many assets (
  .  (2)
I have a bare bones vps from another project that has spare capacity. It has no browser or GUI installed. Is it possibel to install WINE and MT on this type ob box and run it, or do I need Ubuntu with a GUI ? (If so, is a free one from Amazon suitable - mainly for demoing an ea I have developed at
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