MQL4 and MetaTrader 4 - page 590

Hi forum, I am using the following lotsize calculation: double moneyRisk = AccountBalance()*percentRisk* 0.01 ; double lotSize = moneyRisk / (entry-sl)*dir / (MarketInfo( NULL , MODE_TICKVALUE)/MarketInfo( NULL , MODE_TICKSIZE)); lotSize = MathFloor (lotSize/MarketInfo( NULL
Hi Coders, I would like to know the position of the Bid price relative to the TRIANGLE object. Whether is it inside a TRIANGLE or not? Do you have a simple idea for it? Thank you in advance. Relative
I have aclass that I use to check for a new bar. I initiate a timer in OnInit with theiTime function.  Then in OnTick I checkto see if the timer still corresponds with the time of the current bar. YesterdayI noticed a weird behavior in the Strategy Tester (ST), which doesn’t happen inreal trading...
[Deleted]
Hi,   I am having problems with my code, I am personally opening 1 trade at a time per EA window but i have been told that numerous trades open for other people. Currently i have this code here:  in start() double stoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL); double stoplevel=MarketInfo(Symbol()...
[Deleted]
 Am looking for code to turn TP into a Trailstop when it is reached.  What are you looking for ? 
[Deleted]
Hi, Is it possible to make an indicator which would calculate profit/loss of possible trades done by EA? I don't want it to show the real balance but something like the balance graph in strategy tester. Basically EA would buy and sell without actually placing any orders, calculate the profit/loss of...
Good morning i wanna know how to export automatically real time data from excel to MT4 Trader
[Deleted]
Hi I'm trying to create a spreadsheet in Excel 2010 that displays the High Low Open Close for EUR/USD each day for one year. I've tried using DDE in MT4 but can only seem to get the High and Lows from that. Does anyone have an idea as to how I should go about this? If not with MT4 and DDE then where
I know how to limit the number of trades in a candle. However, what I am trying to do is limit the number of trades between 2 points based on price levels.  I define a price level as an input, which serves as my buy price.... If my buy price level for EURUSD is 1.1150, I enter a buy order once the...
<Advertising removed >
Hi,   I'm currently having troubles with replicating the equation used by ObjectGetValueByShift. I think I'm having trouble getting the algebra correctly. I've been using this site as a source; https://www.mathsisfun.com/algebra/line-equation-point-slope.html , but I can't wrap my head around it....
Hi guys. Since I started using MT4,after I download something with utorrent,the MT changes the connection status speed to around 200/2 kb and when I try to place an order,it shows me the "No connection" error.To make it work again properly,I must uninstall and install again the MT4, but after I use...
Hello people!! Why some programmers put the "!" before a function ?? example: !isPositionOpen() and isPositionOpen() What do the different "!" ??   thanks for help! =]
hi guys im triing to open orders if a spwcified prices between highs and lows is reached, but the ea does not open orders. the findentry and buyconditionis called every tick, can someone help me to get this snall snippet working? ist there maybe a problem with the speed of the whole program, i have...
hello, i like to know where the platform take the data when i use iMA function? i delete all my ex4/mq4/mqh files from the platform, but when i call the iMA function from new indicator its still working... where the data is comeing from?  tnx  
New article Graphical Interfaces I: Functions for the Form Buttons and Deleting Interface Elements (Chapter 4) has been published on mql5.com: This article is the continuation of the first part of the series about graphical interfaces. The first article Graphical Interfaces I: Preparation of the...
[Deleted]
  Histogram buffers  (19   1 2)
Can someone please confirm how histogram buffers are used when writing custom indicators? I have already created an indicator that draws a line on the chart window. I now want to add histogram markers above and below the line in two different colours(green above, and red below, for instance). Can...
New article Studying the CCanvas Class. Anti-aliasing and Shadows has been published on mql5.com: An anti-aliasing algorithm of the CCanvas class is the base for all constructions where anti-aliasing is being used. The article contains information about how this algorithm operates, and provides...
[Deleted]
Hi Guys new to this. spent hours on line with no insight. How do I get my charts to show 5 day NY close. I am in UK using a UK spread bet broker (No help from there). Ive tried reloading  MT4 from US sites But keep getting asked for a proxy server??? Rgds Egan
[Deleted]
Hi I’m using FOREXer4 on my dell Vostro 1000 lap top runningwindows 7 and when I close a window itreopens again and again, it’s like that the program presses the enter key automaticallyafter closing a window because when I close a window and click on the otherside of the page it won’t pop-up again....
Have an unbalance here somewhere,    {                          if (Order == SIGNAL_CLOSEBUY && (EachTickMode && !TickCheck)) && (!EachTickMode && (Bars!== BarCount)                 OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen);                 + DoubleToStr(Bid, Digits) +...
Hey guys, Was wondering if any body has the source code for the Fibonacci expansion tool? I would greatly appreciate it. Thanks, Dean 
I'm trying to configure dratfa http://darwins-fx-tools.com/manual.php?intro&i1 for mt4 build 950. I've been able to do everything except download "mql.exe", the compiler. Where can I find it? Will it work if datfra was created for build 600-? Anyone can give me a heads up on this?
Hi All, I'm not new to trading, but I'm new to using expert advisors. The one I have lets me change all kinds of settings, SL, TP, TS, risk, etc.... My question is this: say my EA places a trade and I lose power or lose internet connection. When it's restored, does the EA remember the SL or TP or TS...
[Deleted]
Hello.  I took some Custom Indicator code from out there that was drawing lines across the chart window. Even though the lines "belong" to the indicator, when I right-clicked in the chart to place orders, it simply worked. Wherever I right-clicked, even if the cursor was directly at one of the lines...
[Deleted]
I am using iCustom to call an indicator that has a dropdown as an input. I don't have the source code to the indicator. If the dropdown box contains 3 values with comment descriptions I can of course guess that the values behind the scenes are 0, 1 and 2, and for example pass in 2 if I want to use...
  Error 130 Help  (3)
Hello guys, just started learning MQL4 programming 2 days ago and I decided to code out an EA based on a strategy that I used to trade after watching some tutorial videos online. It is still quite raw and needs a lot of adjustment. However, when I run the EA (it should at least work for the Order...
The idea is simple: EA gives buy signal I take call option with expire on next candle. Has anybody tried something like that?
Hello! I want to learn how to use Stochastic in a EA. But failed to find a sample EA with Stochastic. Can anyone help me ? Hope it's a simple one…enough for me to learn how to put a Stochastic in my EA would be great. Thanks a lot
hello mql4s ppl, sry for my noob quistion. but im stuck on this for 3 days now, il be heppey to be resque. i have indicador "A" that send exteralbuffer like that: #property indicator_label1 "USD Blue" #property indicator_type1 DRAW_LINE #property indicator_color1 clrDodgerBlue #property