MQL4 and MetaTrader 4 - page 1148

[Deleted]
I am struggling to write an EA that sends an order after the price crosses 2 MA's in one bar. I have come up with: int init() {MA_fast=iMA(NULL,0,MovingPeriod1,1,MODE_SMA,PRICE_CLOSE,1); // gets moving average MA_slow=iMA(NULL,0,MovingPeriod2,1,MODE_SMA,PRICE_CLOSE,1);// gets fast moving average 4
[Deleted]
I created an H2 chart using, v1.9 P4L PeriodCon.mq4 However, iClose (Symbol(), 120, 0) doesn't work. Any solution apart from FileOpenHistory("SymbolH2.hst"
  EA mixes BUY and SELL orders  (30   1 2 3)
Hi, I'm trying to code an EA and at some place in my code I've to update the stoploss of opened and pending orders . I'm displaying an alert with the informations about the order. When I run it, I receive a message like: "Count: 2 Stoploss 1.44705 for buy order: 46450421 orderType: 1". orderType: 1
Hello, I'm using indicator: THV (Turhovich) Trix Divergence version 4 to read the trend. I also discover how to use this indicator into my algorithm with iCustom() function. Unfortunately, there's a problem occurred with this indicator. I also attached THVTrixDiv.mq4 below. There are 6 buffers....
[Deleted]
  History of Ticks  (4)
Sorry if already answered here, but for a reason I need to analyze individual ticks for a symbol for a certain (not so long) period of time due to tuning up EA parameters. Pls, how can I get the values of individual ticks or how can I collect them? Can MQL4 export to excel? Thanks
  Click4pips  (1)
Is anyone using this ea, I can not get it to trade, or to back test on Oanda's mt4 platform. one thing I have noticed is that the ea's that work are colored blue, but click4pips is colored gray. Can anyone help me with this issue.
[Deleted]
After studying up on MQL4 for a few weeks, I decided to create my first EA. The principle is to look for a pin bar (hammer) to form within the trend (prices vs 20EMA) and buy on the open of a new bar with 2 pips to TP for each pip to SL. After some initial hiccups, I finally got the EA to compile....
[Deleted]
Technical analysis studies market behaviour. I suggest we consider the reverse: the effect of technical analysis on market behaviour. Logical proof. 1. Suppose that an investor - let's call him Investor1 - has guessed that if you buy at Moment1 and sell at Moment2, it will yield a profit of 1%
I want a stop loss order automatically open and close at a specific time. Which script is suitable ? Many thanks
Hello, I have a new EA. If the BID is above a 200 period moving average and the %B indicator is below 50% 1 period ago then buy at market. The following code does compile but in MT4 under the Journal tab it says "divide by zero" --- which I interpret as an attempt to divide by zero -- but nowhere...
Hi guys, I run the same EA on several currency-pairs. Will the EA's perform on higher speed if I'll duplicate the executable and let each currency-pair to run a different file? Thanks, James
[Deleted]
Hi, I haved read some topics about this problem but i don't find a solution. in my c++ code i have: void __stdcall DLL_EXPORT exportdata(std::string [1] data); and : void DLL_EXPORT exportdata(string [2] data){anotherfunction([3]data[4]);} in mt4: #import "mt4_dll1.dll"   void      exportdata(string...
Thanks for any help you can give :) I want to use 2 indicators that trigger a trade. the 1st indicator is the precondition the 2nd indicator is dependent on the first I must set the 1st indicator with a shift since the 2nd indicator (2nd condition) will happen sometime after Would this be the...
I'm testing a new expert I've developed. What I don't understand is why are results in backtest absolutely different if I backtest it in 1M or in 1H? I thought that when backtesting 1H charts, backtester uses History of 1M, 5M, 15M, 30M and 1H. And that the most detailed history file is, always, 1M...
By checking the Skip Useless information option in Strategy Tester it hides negative results. But is it a good idea to see the worst case scenarios Optimization as these results may happen if the Optimization is not set correctly in the EA?
[Deleted]
  scriptor  (6)
hi all., does anyone know this guy by the name SCRIPTOR?,how can i contact him via e-mail? thanks.
  help required...  (3)
Hi I am newish to Trading and Forex but am also a real idiot with Computers..Once I am set up I am fine...However I need someone to sit with me, (I live near Northampton) and explain the basics of MetaTraders, set up wht I need and to integrate another system onto this...Any recommendations for good...
Hello, I'm having trouble passing trade comments to and from a C++ dll. Basically I'm trying to pass an array of string values back and forth between a C++ dll. Any body know if this can be done? Thanks so much for any help! Tradingbigboy
  Text problem  (1)
I have an issue with my indicator which I dont understand. I have a makelabel function which is supposed to create a text by each bar with a number. the alerts are just for my testing while trying to figure out this error void makelabel(int index){string name,cnt,period;  static int...
int init() { SetIndexBuffer(0, Uptrend); SetIndexStyle(0, DRAW_ARROW, EMPTY, 2, SkyBlue); SetIndexArrow(0, 158); SetIndexLabel(0, "NgepeBarak"); SetIndexEmptyValue(0, 0); SetIndexBuffer(1, Dntrend); SetIndexStyle(1, DRAW_ARROW, EMPTY, 2, Gold); SetIndexArrow(1, 158);...
[Deleted]
All - I appear to be getting an Error Code 130 with the following code on a 1-minute candle chart: RefreshRates(); currOrderTicket = OrderSend(/*1*/Symbol(), /*2*/OP_BUY, /*3*/LOT_SIZE,...
extern int gTF= 1 ; // требуемый ТФ, 0-текущий extern double Discret= 1 ; // шаг дискретизации шкалы цены extern double Width= 30 ; // ширина гистограммы (в барах) extern bool Present= true ; // показывать центральную гистограмму (между двумя вертикалями) extern double Future= 1 ; // множитель для
i have seen https://www.mql5.com/en/code/10370 curIndex = utils.periodToPeriodIndex(Period()); do this means mql4 support OOP object function? thanks
[Deleted]
is there a way to code into the EA to display the defined indicators within visual backtesting? I know I can drag the indicators over and display them but the results differ quite a bit from my EA.
[Deleted]
Hi There, I have recently started using MT4 and after a laptop gave up on me I tried to reinstall the program on the new laptop. However I got the same 'invalid account' error as some searches threw up, none of the fixes worked however and when I uninstalled and reinstalled the software the most...
//+------------------------------------------------------------------+ //| Single Pair Buy leave Email.mq4 | //| | //+------------------------------------------------------------------+ #property copyright "o_0" #property link ""...
[Deleted]
Sorry for asking these, this is weird for some person. But after asking some modification, it bcomes un-workable. May b i am not coder and screw up all things finally. Can anyone pls help to write a simple script that : Once switch on the eA/Script, it will place SELL orders immediately with 1lot,...
ive just come up with very useful /for me/ idea..... is it possible to declare a lets say a var in such format var field_1 (x,y,z,a,b,c) var field_2 (d,g,h,i,j,k) ... ... of ur trading parameters so this are visible in expert as a fields to fill up in sort of password like. lets say ive got few sets
[Deleted]
Hello - I would like some clarification about OrderSend() and OrderModify() with regards to OCO tickets. If I execute the following command: EXAMPLE ------> ticket=OrderSend(1. Symbol(), 2. OP_BUY, 3. 1,...
I am a trader who is trying to step into the EA world. I used a free online EA builder to create a buy strategy when one MA crosses up and over another MA. That works. I then was able to create the sell strategy EA when the MA crosses down. But when I try to create the buy and sell strategy together...