Expert Advisors and Automated Trading - page 198

To post a new topic, please log in or register
is it necessary to Set ExpertMagicNumber?
void OnTick() when does the above function take place? when does it run? please explain.
I am using CTrade class and sending a buylimit request. but I get the result of 1006! I am using this to get the result code: Print(trade.ResultRetcode() ); what is the problem ? can anyone help me?
Is it possible to make an EA to place an exact order of a trade after hitting the TP?!  For example, imagine that I had a gbp/usd limit order at 1.65593 with a 10 pip TP then eventually the order got executed & hit the TP. As soon as the excuted order hit the TP the EA will place another...
ResultRetcode Gets the code of request result. uint ResultRetcode() const Returned value The Code of request result. How can I get the result using the above function? in CTrade class I mean. Thanks Please give an example.
Please someone give me an example of using ctrade class in buying and selling a symbol. for example: buying with this info: order type: buy_limit price:1000 volume:2000 Stop loss: 800 Take Profit: 1200 Expiration: today Fill policy: return //************************// and for selling...
I want to be sure if Metatrader uses Ctrade class for sending buy and sell requests. Does anyone know it? I mean, when for example someone right clicks on a symbol in the marketwatch and selects "new order" and fills that form, does Metatrader use Ctrade class for sending that buy/sell/.......
REASON_PROGRAM 0 Expert Advisor terminated its operation by calling the ExpertRemove() function Can someone explain this?
Hello to all ... I find it difficult to create a simple EA that BUYwhen there is a green arrow and SELL when there is a red arrow. It seems the easiest thing in the world: (..... but just do not do it to him! I tried in several ways: with if .. else; with a global variable on the client...
Hi , I need a free autotrader which can buy and sell shares automatically. I need it to be completely automatic like the take profit and stop loss parts in the metaTrader. Is there a free one? Can anybody introduce one? and provide me with the download link? Thanks
Hello, it looks there is no possibility in optimisation results to see the net profit of each strategy after commission are applied by the broker (unless opening the report in excel to sum total commission). It'd be great
Just curious if there a neat way of closing order without using CTrade in trade.mqh file in MT5.  Just miss simple standalone "OrderClose" function in MT4.
I am getting "invalid request" error for my trail stop function.   I could not figure out why I am getting error message like this:     2014.01.24 00:11:31.014 2013.08.12 11:00:20   Invalid request 2014.01.24 00:11:31.014 2013.08.12 11:00:20   failed modify sell 0.10 GBPUSD sl: 1.55366, tp: 0.00000...
I asked brokers if they allows using signals, and after a positive answer and a subscription I can't see signals on MT4, Then they just quit answering me, do I maybe have setting troubles with my platform? I don't really know how to do. thanks for any answer
Before Buying EA do the below analysis while testing the EA. Don't get impressed by seeing 15 digits profit on investing 3 digit money. Know the ground realities : ) Find out whether EA is using Martingale. For example if you see loss on first order then 2nd order should not have lot size more...
Does anyone know of a reputable service for supercomputer rental? I am running some optimization on my EA and would like to have quick results. I currently have 3 Quad computers and am looking for more powerful solutions.
Hi, I want to start building expert atvisors but I dont know there should I start. Cant any give free books, software, tips and the other information. Thanks.
Hello, I try to code an simple EA I observe that if an open position is closed by StopLoss "touching" PositionSelect() do not turn from true to false. Also I observe that if position is closed by CTrade trade trade.PositionClose() than PositionSelect() do turn from true to false. Please explain...
Have a number of take profit trailing libraries . Just like in chess as an opponent moves the strategy changes the same applies to my strategy, so far if a buy order is taken, take profit will trail the upper Bollinger Band. When my signals go off again while still in a trade for a sell. I don't...
  Coding Challenge (24   1 2 3)
Let's play a game. Let's select a strategy to code and we see how our code earn different amount of money. Rules 1. Select a trading system (How to enter or exit should be stated.) 2. Select a time frame and a testing period 3. Select a symbol Anyone game for it?
Hi everyone I'm still getting started with MQL5, I'm sorry if it is a FAQ or has already been answered in this forum. A friend of mine asked me if optimizations can be run programmatically. What are we trying to do is to 1) Launch a set of optimizations on different strategies at the same time...
Hi, I have noticed while copying a signal provider that his name is changed in the position details to be FROM #number or TO #number. When this happens, I have also noticed that the positions get closed automatically on my terminal even if they are still open at the signal provider side. This...
Hello everyone, I need help with SYMBOL_LAST property in SymbolInfoDouble() function string ls; matL.Resize(8,8); mat.Resize(8,8); double Arr[]; for(int i=0;i<8;i++)&nbsp;&nbsp;&nbsp;&nbsp; { for(int...
I don't understand my back testing result for some of my trading system. It does not matter what leverage I choose on my strategy tester I still get the same profit. Is it correct? This is when I set up leveage 1:500 using 0.1 fixed lot with initial capital 1000 GBP on the strategy tester. The...
Comments that do not relate to the "BUY SELL orders/deals explanation", have been moved into this topic.
Hello, If an EA is already managing a position&nbsp;i.e. atrade has been opened, and then I close (shut down) MT4. When I re–launch MT4, the EA ignores theopen position that it was managing and starts all over again from the beginning, opening anew position. I don’t want this....
I am new to MQL5. I have been writing scripts for years using thinkorswim's Thinkscript. There is an automated trading feature on thinkorswim, but as soon as you try to use the best trading indicators, which all seem to use recursive algorithms, you run into severe restrictions. I have a...
Hello everybody I have written a simple EA that randomly places at every tick a buy or sell order, below I put the relevant part of the code. However, when I try to use it on EURUSD, where Market orders are allowed (price specification is not required), I always get a trade return code 10015,...
How can I find the highest candle and the second one in a determined number of candles. Using the iHighest function. Or another one if needed! Thank You
I had someone on here build an EA for me. I approved all the videos and screen shots, but now that I have it and have put it in place, it doesn't seem to be working. I don't understand the coding/variables very well, which is why I trusted someone else to build it for me. Some help would be...