MQL4 and MetaTrader 4 - page 153

To post a new topic, please log in or register
I have a live account with tradersway.com and I want to open and use two MT4 accounts at the same time with different account numbers on the monitor.  Please let me know how I can do this.  
Hi I'm new in Mql4. I'm trying to create an ea based on the choppy market indicator. I've identified the buffers as follows:    double cma=iCustom(NULL, 0, "CMI",60,10,false,3, 1);//smoothed ma    double cmil = iCustom(NULL,0, "CMI", 60,10, false,0,1); //cmi line    double cmilg=iCustom(NULL,0,...
Hi guys, I'm trying to place a short order via OrderSend but I get error #130. Since I'm a noob in MQL development I'm sure you can solve this issue really fast. :P So here's the code snippet: double takeProfitTotal = NormalizeDouble(Ask-(TakeProfit*Point),Digits); double stopLossTotal =...
Is there any way to execute a code on an external event instead of executing thre code on every tick? For example when a .txt file in MQL/Files folder gets refreshed.   The idea is to send information/quotes to MT4 by an external (e.g. Java coded) program. This (Java coded) program creates/refreshes...
i have  subscribe in signal Small to big money please how i can changing lot size to 0.02 or 0,03 thank you very match 
Hello, Can anyone please add a stop loss based on pips for this script. This script launches multiple orders simultaneously Set manually s stop loss of 40-50 pips when we execute this indicator. Able to set a stop loss for EUR/USD order 40 pips Able to set a stop loss for EUR/GBP order 50 pips Able...
Hi guys  I wish to have the MT4 to have the prices update when the market is closed (weekend) so I can test EAs immediately while I am coding them without backtest. The data prices obviously are random or past data. Does anyone know of  way to do that  or a plugin that allows that?    Thank you
Hi,  I am new to MQL4, I haven't had a problem coding lotsizes based on a fixed amount of pips but cannot seem to make it work where I am calculating the lots size base on entry and stoploss levels. Please advise... Code is below...  void EnterTrade(int TypeOfTrade){    err=0;    double Equity =...
peterhw
  Invalid stops error 130 (17   1 2)
I have been using XM brokers and appear to get Invalid Stops occurring more often tyhan elsewhere but in any event don't quite understand what factors can lead to this error  I read the following with WHRoeder's comments - interesting but don't don't think they apply to my circumstances  https://www...
Strange Discovery; I need Help! I discover today as I was trading using my hedging strategy that I could not place a pending order within my recovery gap again as the platform kept on saying invalid SL/TP. I sense there was a little volatility in the market then but even for like 1hrs after then,...
hi, i am writing a custom indicator, i need it to sum the closing price based on specific time for x times  for example, sum all the closing price happened at 1100 pm only for last 10 days on a hourly chart(because it may miscalculate on other time frame) assume today is jan 30, the indicator will...
Perhaps a large portion of the negative aspects of the NFA hedge and FIFO rules could be mitigated with Back Office record keeping. (or somewhat mitigated with a good dashboard and a reliable VPS. There would not need to be any creative bookkeeping just strict protocols for interpreting orders. If...
Hi guys. I am trying to write an EA which will auto download a file from the internet, then read data from that file and then execute trade using those data. but i encounter problem with downloading file. the file i download got a bigger size compare to the one on the server. If I run this code on...
Another proof why an EA has most of times completely different results on live. Imagine that bug on a live account with real money, easy way to lose your money thinking that it is because a bad robot. No always! Sometimes may be because of a platform bug. On tester, orders 3 & 4 close with pips gain...
Hello! I have a problem. When a use hash.mqh in EA then I have a bug I attached my EA but dont attached dll file. log file: --- 2017.01.12 19:37:37.572 hashtest USDCHF,H1: invalid pointer access in 'hash.mqh' (631,24) 2017.01.12 19:37:36.249 hashtest USDCHF,H1: checkHash:true 2017.01.12 19:37:36...
Hey Guys its kinda strange, and i don´t get the problem solved. Maybe some stupid failure pls help ;) a bit German included but not important ^-^ This works perfectly. void drawVerticalLine(double Rastercounter, int Teilnehmer) {     string  lineName   = "asdf";       if(ObjectCreate(0,lineName,...
Hi everyone! I'm trying to merge some indicators using iCustom. An indicator which I have problem with is TrendChannel.mq4   Parts of the code are these:  extern int  degree = 1; extern double kstd = 2.0; extern int  bars = 48; extern int  shift = 0; extern int  AlertPipRange = 5; extern string...
Hi guys   As I started Meta Trader 4 this morning, I'm suddenly not able to select periods and tools for a chart. These buttons are all greyed out.   This picture explains what I mean:     I also noticed that I have no connection to the broker server. Maybe this has something to do with it?   Does...
Ok this EA has been running for about 6 months. Just thought I would check a funny sell order, and this is what I found. The Trace line printed 3 different time event series on the same line!  1. My trace showed IMA moving averages of USDJPY  showing at yellow line on chart.(115.994 ma3)  (115.966...
  script help (1)
I found this script on the forum for limiting open orders but I put it into metaeditor and it givevs me errors when i try to compile it. and would this work with an ea i have on a char like eur usd or usd jpy?   #define MAX_ORDERS 5       ...    if(OrdersTotal()>=MAX_ORDERS)      {       // Don't...
I get the 130 error from time to time and i cannot figure out why this happens. I place two pending trades - a Buy stop and a Sell stop. The one will get accepted and the other is rejected with an error 130 message. I use ThinkForex which have no minimum StopLevel. They are a STP broker. My Stop...
  Sunday night price bars (16   1 2)
I trade daily bars, but the Sunday night bars are useless to me, and they skew the price patterns I'm looking for.  Is there any way to either: a) delete these bars from the chart, or b) blend the Sunday prices into the Monday bars (ie. make the 2 bars become one), or c) identify a Sunday bar in my...
Hi, Am I correct, that there is no function or system-variable that tells a class whether it is called by an indicator, expert or a script?
Hi,   1st, sorry my english.   I have crossing moving avarage robot, but if it has an open order, dont open another order until have closed the previous.     This is the problem? Thank you   
I have never considered this before. I just wondered if anybody actually knows the order of an iCustom() call in an EA. Is the iCustom executed before the the code in OnTick that uses the value? I ask this because I am currently working on a project where the iCustom call is only executed on a new...
Please, what function opens the scripts to EA?      
Hello. You know kindly tell me, how can I create, the "v_line", to use as a separator period (say monthly), so I remove the default ones of mt4. thanks  
Hi, I'm attempting to implement a parabolic SAR based strategy using a source created using EA Builder. When I compile the code, the error shows:  '{' - function definition unexpected The error relates to the item highlighted below:    {Strategy: Parabolic change - 1 day   Created with EABuilder...
Hello Friends, i'm a beginner for mql coding, i tried too much but i could'nt write an EA correctly that i thought, maybe somebody help me about this, steps are as following; 1- EA will open 1 BUYSTOP and 1 SELLSTOP using highest and lowest of last 3 bars, OP_BUYSTOP at Highest[last 3 bars]+5 pips...
Hi guys, i can't make updating my pending orders on every price changing, moving following price until 3 sec before news relaese (yeah another news trading ea). I wrote an ordermodify but seems to work just once. i saw many ea on youtube that create moving pending order until news relaese, but i...