MQL4 and MetaTrader 4 - page 508

To post a new topic, please log in or register
//+----------------------+//| CCI SAR/Cross Expert |//+----------------------+#property copyright "Ron Thompson"#property link      "http://www.lightpatch.com/forex"// User Inputextern double Lots = 0.1;// Global scope// Profit factorsint    TakeProfit=0;int    Pym=0;int    myCCI=0;// Display...
I have wanted to read files from a www address. I found and worked with some code that does it. - It works - but if I change the data on the website and run the script again, it doesn't update the read on MT4. If I turn off and then turn on the MT4, and re-run the script I get a fresh read and it...
Hi, I have been working on building an EA and custom indicator. In the custom indicator I set up some buffers to display lines across the chart and a few Objects to show information like the spread, distance between lines, etc. In the top right corner of the chart I have my objects displayed, so it...
Is anyone willing to build this indicator for me? I've seen it in other packagesand want to make use of it. I've included some basic information below. If youneed more info I think I could find some. I could provide the code from anotherpackage if that would be helpful. Time Series Forecast The...
when integrating vertical lines https://docs.mql4.com/objects/ObjectCreate a selection of the window can be made by using the predefined parameter. I noticed that a vertical line in the chart window (when the parameter "0" is set) crosses all the subwindows which are present as well instead of...
Hi I want to create a EA that can place stop loss and take profit one every order! The EA must see the sell price or buy price and for Example for buy price: if opening order price between line 38.2 and 50 the ea automatically place stop loss on one line before fibo=23.6 and place take profit on one...
Hi I am an experienced developer but this is my first attempt at an MQL4 expert advisor. I am looking open two pending orders on the Germany 30 indicies as soon as it opens (7:00 BST). As my broker is alpari and from what I have read their servers work on GMT+3 this means I should try and get the...
I want to place a pending long order and then when "something" happens : a. delete it OR b. if it is executed, close it. Will it change type if in the meanwhile the price hits the buy limit or will another order be created and this one will be automatically closed? If another order is created, how...
Ok - so first off, if anyone is offended by my "incessant questions", then just do not bother writing on here wasting your own time. For the sake of avoiding waffle, this is what I am wanting to understand if it is plausible to do: Imagine a given system has an average strike rate of 75%, profit...
Hi, ok i tried to get the three last close values in the journal: This is my code at start: double Hilfsvariable= (Close[1]); Print("Aktueller Close ",+ Hilfsvariable); double Hilfsvariable2= (Close[2]); Print("Vorgänger Kurs ",+ Hilfsvariable2); double Hilfsvariable3=...
Hello people. I would like to know if there is a way of find the max and min value inside an array who has a variable lenght. I know how to find the max and min in an array with a fixed number of elements, but if the number of them is variable I don't know what function is suitable to use in those...
I think somewhere in "The Book" if says having user defined functions is slightly less efficient (but much clearer to read and program). I'm wondering if I can use user defined functions while writing the EA, and then, when it's time to compile, copy and paste each function in place of the function...
Hello, I subscribed to a signal, then the signal tried to do an order on XAUUSD and the journal said symbol not found (Even though my broker has it, I do not know why it said not found) and then it unsubscribed. Is there a way to make it stay subscribed when the symbol is not found? Also does...
HerrHimmler
iHigh(Symbol(),PERIOD_W1,1); // returns zero in backtesting Why does the above function return zero in backtesting but the correct value in real time testing? Is it a platform limitation? Or is it something specific to my local installation? I would assume the latter as I seem to recall using this...
  how I code? (4)
int orders= OrdersHistoryTotal();if( OrderSelect(orders,SELECT_BY_POS,MODE_HISTORY==true))    {     if(OrderType()==OP_BUY) //Month()==12 Year==2013  )        {      OrderSend(Symbol(),OP_SELL,,Bid,1,,,"",MAGICMA,0,Red);           return;        }  else if(OrderType()==OP_SELL)...
Hi all, Just going through the MQL4 book. It says that limit orders become market orders when the price is hit. So does this mean there are no actual limit orders in MT4? Thanks in advance.
Anyone know if is it possible to get the actual price where two lines intersect as this usually happens in between bars ?
I might have found an ugly bug in the Optimization side of MT4 build 509, related to the new Spread control feature. After running an optimization for the first time, with a Spread value of say 40 pips specified in the new Spread control box, if you just change its value to another number (50 pips...
If the candle doesnt have upper or lower shadow does the High[] and Low[] return the highest/lowest point of that candle so an Open[]/Close[] value depending on the type of candle (bear/bull) or is it return an empty value?
Hey guys, this is my first post and just wanted to say thanks real quick to everyone here who has contributed. This site is a goldmine as long as you're willing to take the time, be patient, and use the search function. So anyway, after a long struggle but eventual success, I created a script. The...
When drew trend line by --> ObjectCreate("Trendline",OBJ_TREND,0,Time1,Price1,Time2,Price2) . What function use to get degree ? thank you
How to set the color of a moving average in an EA,since i cant find any parameter to set it double iMA( string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift) Any suggestions? TY
I have M1 for USD EUR loaded in a single MT4 offline test installation : My Code code at Start = double Hilfsvariable2= (Close[0]); Print("Aktueller Close ",+ Hilfsvariable2); I expected the get one close for each 1 minute candle in the mt4 journal: These are the lines in the history center:...
[Terminal Panel] at the bottom of MT4, which can appear by "Cntl + T." TODO_01 : assign the different value set for different currency pair in the row of the terminal TODO_02: change the font size bigger perhaps the height of row of the table, too, accordingly. Which file in the source code...
Hello! good afternoon. i want to modify attached source to suit what i want style. this is trend line alert and if price line cross then alert fire but it every bar alert fire so i want to try to make it only one times for alert but no luck. i was used static datetime Time0; if(Time0 ==...
Hi HoW easy is it to program a Good For The Day where; the EA will look at order history just for the day and see if it has gotten like 10 pips? thx
I'm using an indicator called 10.2 TMA slope, and although it compiles without errors, and even works in an EA, when I backtest my EA, a whole bunch of error messages pop up in the journal saying, \ 10_2 TMA slope v1_4B 4_30 for EA EURUSD,H4: unknown subwindow number -1 for ObjectCreate function....
I want to substract the minute value as 10: eg: if i give 00 means it should consider 50, 50 means 40,etc... tried following code. but it seems wrong. can you suggest exact idea to substract the minute? extern int newsDateMinute = 30;newsDateMinute -= 10;