Download MetaTrader 5

MQL4 and MetaTrader 4 - page 179

To post a new topic, please log in or register
Hi, anyone have idea about DAX future curruncy pair calculation method in forex. like example if i opened a buy order on one standard lot.... the value for 1pip=10$ on my broker. there should be the 90$ profit on the 9 pip TP but its 100$. & my broker also charge commision 6$ on one standard lot......
  Cleaning Code (17   1 2)
Hi Guys I've finally finished my EA/Bot but (even though I have been anal about keeping it clean) I'm wondering if anyone can point me in the right  direction as to how I can clean the code. ie. get rid of variables that are not used etc. It's just over 8000 lines so I would hate to go over it line...
If i get a trade signal via email, is there a way to automatically trade the signal as I get it?    
Hey guys, I used to place buy limit and sell limit orders and alerts simply right clicking on the chart and clicking buy/sell limit. Or right clicking and using trading submenu. Today these submenus are suddenly gone and I couldn't find a way to fix it. I posted a screenshot of my right click menu...
I have a weird one below: The if statement should only be able to return 'true' on Fridays, yet i have this trigger every day for some odd reason and positions close as a result. void OnTick() {<snip>  if(TimeHour(TimeLocal())==23 && TimeDayOfWeek(TimeLocal()==5))     {      Alert("Reason to close:...
Note: If this post is duplicated, sorry.  I'm pc crashed while I was doing it. Isn't an object of this type supposed to support text in it?  My code draws the box just fine.  But no text shows up inside.  I'm pretty sure I'm missing something.  Anyone know? #property strict#include...
Hi all, I'm very new to MQL4 programming. Still learning and looking how to make some indicator for my own use. I face difficulty when creating multi Heikin Ashi Smoothed indicator.  Below is my code for the indicator. After I compile, it can only see MAPeriod1 only. If I can MAPeriod1 style to LINE...
I am hoping that someone can help me, I am very new to mlq programming. I got someone to do a EA to copy my trades, however, this guy one important function so I am hoping someone with programming skill would come to my rescue. The EA copies from master account, but when source closes its trade my...
Hi, i have some bug in my indicator so i'm debugging but i have some question. following is parts of code . when debugging step through i want to see result on the chart immediately. but when this code executed OBJ_TEXT not updated on the chart immediately. i inputed Sleep function for check whether...
Hi, I am starting to develop an EA based on price action strategy and I have some doubts that I would like to ask for your help. At the moment, on the EA I want to search for pinbars with 3 EMAs (5,45,200) on the correct order on TF=Daily. When: - Appears a long pinbar and EMA5>EMA45>EMA200 => BUY...
Hi all, i am just new on this forum so let me introduce my self first: my name is Dave, 34 years old and i am trading now for the last 4 years. i am using MT4 as a platform which is working fine and profiteble every day. i am not using a lot of strategies or indicators which make's doing my trade's...
How can I return tobuild 502 version. My EA will not run in the 950 version builds.   Thanks 
Hi, I would like to ask the following. I have created an Indicator that creates a Regression Channel and passes the values of the Current Upper,Middle and Lower Regresion Lines for each tick to a MYSQL database. I would like to test the aforementioned indicator in Strategy Tester Mode and fill by...
is this possible? if yes please give me a suggetion to code?
this is the indicator code   double val[];int count=0;int init(){SetIndexBuffer(0,val);return (0);}int start(){ TheValue=count; ArrayResize(val,count+1); val[count]=TheValue; count++;return (0);}int deinit(){return (0);} Now this is the ea #property strictint init(){return(0);}int start(){ double...
I'm making an Indicator that recognize candle, trying to paint the candle and i see that there's a DRAW_COLORCANDLE  option, but nothing on Documentation to help me understand how it works.   Right now i'm using histogram like the file in here (https://www.mql5.com/en/code/10623) . But the main...
Is it possible to this? If so, how?
Hi guys,   My shellexecute is calling a python class which would return some value. How can I get this value? Here is what I am doing but its only returning 42.Any amount of help would be great.   #import "shell32.dll"string ShellExecuteW(    int hwnd,    string Operation,    string File,    string...
i dont know why but it always return zero, help double test_array[];int i;i=1;int init(){return (0);}int start(){test_array[i]=3.2;alert("value = "+ test_array[i]);return (0);}int deinit{return (0);}
I have tried IndicatorCounted and Bars, but its always return the same value. I need to count ticks for arrays. 
Hi there, I'm trying to calculate MA of Z-score. Z-Score calculation works fine but I can't get any value out of iMa. Any suggestions? Cheers! double GetZ(int bar)   {     double z_score[];     //Calculate Z-score  z_score[bar] = ((iClose(NULL, PERIOD_CURRENT, bar) -              iMA(NULL...
I just want to understand why Close[0] is always less than BID price by 0.5 pips?? Am on FXCM demo account. Does this difference exists even in real time trading accounts     -Thanks 
Hello guys im coding my first EA and im with some problems with the stop loss.  So, in the 1 minute time frame it wroked perfectly, but i tryed to test the EA in higher time frames than i got an error about unmatched data, i downloaded from de history center data from the pairs and it runs the EA ok...
Dear sir To Refer Future Bars in Amirbroker we can use Ref( ARRAY, period ) The formula "ref( CLOSE, -14 )" returns the closing price 14 periods ago. Thus, you could write the 14-day price rate-of-change (expressed in points) as "C - ref( C, -14 )." The formula "ref( C, 12 )"...
Hi, i have been trying to figure out why my trailing would not work. When a trade is executed, i would like to change the stoploss accordingly like a trailing stop. I used an OrderModify to modify the stoploss as per seen below but always ended up in an error. After some testing, i suspect that my...
I have searched google and the MQL's but I cant find any examples on how to change the colors of the axis, scale, etc. I would like to cahnge the according what order is open. red for sell,green for buy,blue for no orders.
Hi, I would like to ask if someone has already tried to accurately check if a certain trade is closed by stoploss or takeprofit. I have a function that deals with this but its not that accurate because it checks the orderhistory then checks the comment if it has "tp" or "sl" on it but the problem...
Hello Forum, So I recently started to think about recovery safeguards for this EA, in the event of server crash, power outage, the likes. One hint I found somewhere was to use... Global Variables of the Terminal as more permanent storage for some of items that would need recovery - mainly doubles,...
Hi All, I have an EA that opens trade at a specified time. It is working well on currencies. However I have a problem with CFDs. Curious is that if I use Strategy Tester, EA works perfectly. But when I set EA on my demo account to forward test it, it is not opening trades. No errors and no warnings...
I have written an EA that is quite sensitive to small price changes of 2 pips and more. When testing on historical data in the Strategy Tester it gives beautiful results, but when doing forward testing it is very disappointing and not profitable. When I retest the EA on the live data used for...