Expert Advisors and Automated Trading - page 11

To post a new topic, please log in or register
H there , I want full help from programming professors. I am trying to make EA from Fx Eagle Indicator , My EA working on Moving average fine this is my cod: //+------------------------------------------------------------------+ //| |
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 Guys, wondering if is there any function to set focus on specific chart? i wrote a script to open charts with ChartOpen (MySymbol, PERIOD_D1 ); however whatever chart i run script from keep the focus not the newly opened charts, so for example if i wanted to use Comment or other functions etc on
Hi everyone, I just started learning how to code yesterday so i'm fairly new to all of this. I'm sorry if this is a stupid mistake but here is the problem i'm trying to solve. input double MarginPercent= 300 ; //User input for the margin percentage the user wants to trade with input double
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)
Hi.. am trying to make a version of trailing pending order for mt5 always get order modify error mql4 working pending trailing order void TrailPendingOrders() { if(Order_Type==Stop_Order && Mode==trail){ double price; int total,totalTrades=0;//---- total=OrdersTotal();//---- bool ordmdf;
I've been trying to code my strategy into an EA and i use all symbols and all timeframes when using my scalping strategy, i've been trying to do the same with the EA and end up with some error, i am still a little new to coding and my code may be completely wrong but someone help me out. If im using
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 all, I couldnt find any solution that worked on the following problem: I added a new "Order function" to my EA, but everytime I get the warning "return value of OrderSend should be checked". The EA doesnt open any trades anymore. void BuyOrder() { //--- prepare a request
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
Hi, my understanding of logic regarding this event is, that it is sent when the chart changes. But it does not in many circumstances in MT5: 1. User changes the scale from normal to fixed scale 2. When bars are growing and exceed the current price scale 3. When the scaling (zoom) is changed These
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
Hi, I'm uploading an EA into the marketplace, and the backtest shows me: Not enough money. The default start lot of the EA is 0,01 lots (no marti), when I look into the backtest journal I see, that the EA is being tested with 0,2 lots. Why, can someone explain
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.
I've already used up all 5 activations of purchased EA and I need more activations... How can I purchase more? Market doesn't give me an option to purchase more. It just said that I have already purchase this EA. Thank you
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()