Expert Advisors and Automated Trading - page 333

[Deleted]
Hello ,  I'm making an Expert advisor including MACD In the code I depend on the value of Signal and Main line ( Histogram) in MACD in the bar 0 and bar 1 . it works perfect but sometime it comes out with strange values as -7.835123405921764e-05  , I print out those values so you can see in the...
How do I place a new buy or sell order in code if conditions are met? I've tried this, but no results:  CTrade trade;    MqlTick Tick;        MqlTradeRequest myRequest;    MqlTradeResult myResult;    ZeroMemory(myResult);        myRequest.action = TRADE_ACTION_DEAL;    myRequest.type =...
  DateTime to Time  (6)
Hi I want to get time portion out of datetime.. please help ie, 2017.0.15 15:30:00 to just 15:30 The idea is to close trades after 15:30. Please let me know how to achieve this. Thanks
Подозрительная финансовая активность пользователя 'goldenjet': +99, fail P to ' goldenjet ', email 'accounting@reagormedia.com'!='admin@uswhss.com'
Okay so I'm very new to this and have very little understanding of trading and I'm just helping someone else out. I have a very simple task: to open a new sell or buy position if certain conditions were met, but I can't seem to work this out. I've tried googling but nothing came out. I've tried this
in this EA my problem is that it moves the TP but doesn`t set  the SL and in the journal the value for stoploss is ZERO please help me with this. //+------------------------------------------------------------------+ //| Expert tick function                                             |...
Hi All If someone could help me achieve the below it would be great; In Ontick() I have some indicators, 1. when indicators generate Open Signal I want to book a trade and create a position 2. When indicators generate Close Signal I want to close position. Please help
[Deleted]
I think that this code has no errors. //Codes From controlerrors.mqh  //_CountErrors is constant 150. // Error Line is 85,10 (Structure Array Error) ArrayResize(Errors,_CountErrors);  85   Errors[0].code = 10004;Errors[0].desc = "Requote"; But my ea( containing controlerrors.mqh) cannot init after...
How to call a function after each 45 second? Period of call function = 45 second
Hello, hope i am posting in the right topic. I've been trading Binary Options(never tried Forex) for some period of time, on other side i'm happy that i've learned many things from it, but in the other side, the profit results we're none(let's not go deep in my history, binary options in my opinion,...
Hey, When i'm going to test the EA TMA this happens in my diary; 2017.09.12 02:27:43.045 Core 1 2017.09.11 23:41:00 CTrade::PositionOpen: market buy 0.20 EURUSDmicro sl: 1.18938 tp: 1.20438 [invalid fill] For what i have searched the error is in the codebase of the EA but i don't have acess to code
Hi, am programming in C# and wants to use my code to backtest RSI settings that I then wish to program in MQL.  DOES THE CALCULATION LOOK CORRECT BELOW? I'm using SMA-method for the calculation. In the example below I will have a setting of RSI 5 1) Calculate ChangeUp and ChangeDown for each bar by...
Hi My adviser does not want to trade. It compiles without errors but for the love of me doesn't open or close a trade. What an i doing wrong. Take note this is my first attempt so i might have missed some functionality. Any advise would be appreciated.
I have a problem with the condition for example to buy orders. I want that the EA is opening an order when following conditions are met: (GoLongSandR=true and(Pattern1=true or Pattern2=true or Pattern3=true) That means always SandR + Pattern(s). But it is opening orders when any of theses Patterns...
Hey, does anyone know if this EA are already made: In the EA you set a price that says to the EA that "if price closes beyond this point (close above if selling, and close below if buying), then the trade should exit. You should also have the possibility to set timeframe in the EA (if it closes on 1...
Tenho m EA que disparou a dar ordens sem TP, em um único par, mesmo tendo ordem para dar no maximo 20 ordens. Preciso de uma linha de programação que limite o numero de ordens por magic number, para reforçar segurança do EA Desde ja agradeço
Hi All, Kindly let me know if it is possible to write an MQL5 code to automate this task. A. Download csv File from http://abcx.com B. Save or replace it in \MQL5\Files folder I have tried with #import "shell32.dll" and #import "wininet.dll" but seems not able code them to work properly. Any working...
Hi There, Can you kindly assist me with how to obtain two previous ZigZag Swing Dates?
Hi, I have coded an EA that is guessing future trend. I would need to draw that future trend on the chart by displaying a zig zag line shifted to the right of the chart. From that post, the guy is asking about "How to draw something in future time coordinate ?" for indicators. I can see that it is...
I wonder why last value of MqlTick return 0.0? Here the trivial code void OnTick()   {    MqlTick last_tick; //---    if(SymbolInfoTick(Symbol(),last_tick))      {       Print(last_tick.time,": Bid = ",last_tick.bid,             " Ask = ",last_tick.ask,"  last= ",last_tick.last);      }    else...
Hello all, i am new to MT. I am wondering is it possible to write a code so that i can plot the chart timeframes which are not available as standard. For example, a single candle which is equal to 2 day, 133min, 7hour etc? Thanks for your replies.
  MA Crossover EA  (2)
Hi, I am having trouble with my MA Crossover EA. I wanted to enter sell positions only when the price (that is set up as 1 day MA) crosses 14 days MA from above.    extern int FastMA = 1;   extern int SlowMA = 14;   extern double LotSize = 0.01;      extern int ticketSell;int OnInit()  {...
hi guys, I'm a newbie with no programming background. I start to self learn writing EA by reading other free EA online and also the Help Manuel in the EA editor. The progress is ok so fair. However, some times I face some fundamental problems that I can't understand. I hope that u guys can help me...
  EA help  (1)
I have no knowledge using MQL however i created an EA. Can someone assist in reviewing my code to see if the EA would work as it is and if not what I can improve on. Any help would be much appreciated. 
can anyone create an ea to detect alert message box? when alert message box pop up then send push notification to mobile phone. Because i have seen many indicator only has alert message box but don't have push notification to mobile phone, and they are ex4 files which cannot be edited, so it is good...
Iam trying to test an EA using the strategy tester but it gives positive results(as i programmed it) for the first few ticks and then stops following the programmed instructions, Apart from the sleep() function ,what other disadvantages can one face while using the strategy tester??
any one who is good in coding eas .i have an EA but im struggling to code it to work under a certain account. like lets say im giving it to my client i want it to work only on their acc . if the acc is 24689 then it should work only on that. anyone that can help me im gonna share the EA with because...
Hello! I am a complete newbie to EA programming and managed to get an EA together through the free EA generators. The EA works just fine, but when the signal gets triggered, the EA keeps opening trades until it runs out of margin. Please, could somebody help me with limiting the EA to only one trade...
[Deleted]
I have two EA that file open very frequently. The 2 EAs are bonded with same files. The EA reads a file per every 100 ms. and all opened handle has file close function, and error exceptions. But severals hours from first start, the eas stops and cannot access files. I want to know there is any...