MQL4 and MetaTrader 4 - page 1038

[Deleted]
Hello, I use this script to open a order. I get an error -1. Why? Regards, Pierre8r //--------------------------------------------------------------------// simpleopen.mq4 // Ïðåäíàçíà÷åí äëÿ èñïîëüçîâàíèÿ â êà÷åñòâå ïðèìåðà â ó÷åáíèêå MQL4...
Hi Can I get the time of a tick in milliseconds ... even if I have to go to the time on my pc it will be ok because I am interested in the speed of 1 tick to the next? Any help appreciated ... Thanks Paul
[Deleted]
Below is a simple test script that uses an allegedly correct routine to make sure the orderLotSize is evenly divisibly by 2. I think the routine does, indeed, always provide an even number that is divisible by 2. The problem, as shown in this example, is that an input value of .50 is returned as .48...
[Deleted]
  combination of 2 indicator  (28   1 2 3)
i wish to combine 2 indicator, but seem not working.
[Deleted]
Hi, If i have a few trades on at the same time and I require changing the SL continuously (after every bar). any advice on the code to use? Thanks.
hi, everyone, For searching the good time to place order, i'd like to find the range bound period. in my opinion, it should be a good market after the range bound. then i wrote the indicator named RangeBoundMA. it based on the different prices among the 3 SMA lines that the periods are 38,140...
  order split  (5)
Hi all, is there the possibility to split an order in 2 orders after it was opened? I'd like to give a take profit at half size, an leave the other half without take profit. I know I could open 2 different orders at the beginning, but I noted that with high volatility my broker executes only one...
  Suggest a topic for research  (86   1 2 3 4 5 ... 8 9)
Good evening! Comrades prompt with an interesting ( and not too heavy topic) theme for research, for the practice. Specialty: mathematical methods and models in economics. MQL as a tool. What comes to mind, so far, is a forecasting task...maybe a crawler method (SSA), writing a neural network
Hi all, We are releasing the first indicator builder based on natural language so now you can create your own indicators without any programming. No coding or mql knowledge is required. You can get more info here http://noprogra...
[Deleted]
hello traders can someone please show me how to save statement as html fileI did it last time but for some reason I can't save this time. the message i got is Thank you
hi guys, i did backtest in different currency by the same EA. but the results get me so suprised. AUDUSD AUDJPY. this EA just want to follow the slow MA lines trend. when slow MA up, we buy when fast MA lines cross up it. as new to forex, i have no experience in these currencys. would someone...
Hi, I would need to define the size of my array by an external variable, is that possible? Example: external int Size; ... double Orders[Size]; When compiling it fails on the array declaration: "integer number expected" Thanks in advance!
hi, this is a new indicator that i made to see how the MA lines changes. it is not the first indicator i created, but no lines in the seperate window. i checked the code again and again but still nothings wrong found. i copy the code to mql file named "test" and test it work well. anyone who please
I am thinking of close all open orders at 23:59:00 on Friday but it may not happen when there is no new tick coming in. I have searched the documetation but did not find anything close. Please help me. Thanks
Hello, I need EA to check opened market orders (BUY and SELL) and IF NEW bar - Open[0] is NOT equal to some of other opened orders BarOpenPrice - which is printed to OrderComment of each order to open new order. Of course if there is no open order at terminal this is not the case
[Deleted]
  ObjecstTotal  (2)
Specifically, I have 5079 Objects and ObjectTotal=4988, so it does not see a lot of them. My objects are named as numbers in sequential order. i.e 1, 2, 3, 4...etc are each converted to string and used as the name for each object. So its really easy to tell what I can not access. Above 5033...
[Deleted]
I programmed an indicator that uses tick data, however, when I run it in the Strategy Tester, Ask price will not get populated on each tick so it won't work. However, turned the indicator into and EA (in part) and it now has access to tick pricing however, I use indicator buffers for storing values...
Hello everyone. I have noticed that the EA I am working on closes trades if an MT4 is restarted. The issue is that the SL and TP values are lost due to the deinitialisation and logic to close trades gets triggerred on 0 TP values. Could anyone recommend how to store SL, TP and other values used for...
// from p64 of 'Expert Advisor Programming' by Andrew R. Young: double TickValue = MarketInfo(Symbol(), MODE_TICKVALUE); If (Point == 0.001 || Point == 0.00001) TickValue *= 10; Is the equation in Red above a typo or ??? If not what does it mean and what mathematical calculations are being done...
[Deleted]
I cannot have the trailing stop triggered. I don't know why. Here is the code: extern int ticket; extern double SL; // -> Stop Loss void Trailing () { int TrailingStop=MarketInfo(Symbol(),MODE_STOPLEVEL); if((OrderSelect(ticket,SELECT_BY_TICKET)==true) &&...
The following was prompted by a query from fbj in 'Can I code in MQL to turn on and off an already running EA? ' Posting this as a new topic to give it slightly wider attention, because I don't think it's been done before and it's a fun little experiment. It demonstrates using a DLL to subclass a...
[Deleted]
can anyone advise, what's the coding for at the start of each candle (different from the time frame you are using for the EA itself) thanks!
[Deleted]
  Day of week  (3)
This is my first encounter with this function. Comment("DayOfWeek() ", DayOfWeek()); When I run on strategy tester it shows me always number 5, no matter what day. Can somebody please help? Thank you.
[Deleted]
hi i have just switched to android from iphone and bought the new htc one x. The problem i have is that i have to always setup the symbols i trade every time i launch the application. It doesn't save the symbols like it does on the iphone version. i am not sure if its how i close the app that...
[Deleted]
BJ A TOUS, BESOIN D'AIDE..je développe une methode trading forex et, je recherche un indicateur avec alerte "popup" pour savoir : quand la ligne de cotation coupe (hausse/baisse) mes lignes exterieurs de bbollinger. Merci ! celui qui me trouve ca recevra ma methode !!
  MT4 crashing silently  (17   1 2)
Hi All, I am hoping that someone has seen this before. I have an FXCM MT4 b419 system running on a VPS. Occasionally when I log into the VPS I find MT4 is closed. The VPS hasn't been restarted and it looks as though MT4 has crashed. Anyone seen this before, or have any ideas how to replicate the...
[Deleted]
According to the official MQL4 documentation for trading functions (https://docs.mql4.com/trading) a MetaTrader 4 Client Terminal has only one thread for trading operations which means only one trading operation can be executed at the same time - others fail with the error 146...
[Deleted]
hey, i am trying to check for intersection between ma 20 and ma 50, the function i wrote seem to work, but its seems to be non consistentic. sometimes (depends of current value) the intersection accures when the substraction of the two MA's is ~0.2 and sometimes its ~1.4. how can i determine for...
[Deleted]
What is the shift parameter for? It was explained as "Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago). " which i could not understand what it means? Say i was to get the value of previous bar closing price, i should use -1, 0...
Trying to figure out a 'kluge' / 'work around' for Conditional Branching/GoTo in MQL4