MQL4 and MetaTrader 4 - page 1233

[Deleted]
  Doubt  (13   1 2)
How can we put this into a code statement: if the previous BUY/SELL order was inside last 5bars, then do not open BUY/SELL respectively. I've been searching and trying various logic but it's not giving any desired results. Thank you. Regards, Rohit.
hi forum, how can i find the highest high from 2-6 am? i tried it with iHighest but it does not work. can somebody please help me? thank you!!
[Deleted]
Hello all, i want to program an expert to replace an indicator, all the expert has to do is to take an order sell when a red dot appear and take an order buy when a blue dot appear on a custom indicator called Max Moving Average. And one more thing the expert will do is to close the previous order...
Hello everyone. I decided to get an EA and found one i like at www.superfxrobot.com. I don't know much about EAs so I asked around and people told me it quite good and they show real and demo accounts. What are your opinions on this EA? Is it really good? I need your help before I buy it. Thank you...
The following code moved stoploss to breakeven. It sets a global variable in doing so, then to remember that stoploss has moved to breakeven on that particular trade. The code works when i have only one trade open, it will store the global variable and all functions work as they should in my ea. But...
[Deleted]
hi seriors, i m new here, can anybody tell me if there is free ea available around here that can make alarm when parabolic sar change the direction? if no can anyone buile this simple ea, i would be very grateful to you guys. regards, Amar
[Deleted]
Hi, I am currently developing a calculator.But that i will need mt4 data in excel. Well i know that basics of excel data fatching with DDE server and formulas like Quote: =MT4|bid! EURUSD Instead of "bid", you can also put: ask, open, close, high, low & volume But this shows daily data range.Does
[Deleted]
could anyone help me please .... thank you ...
problem solved!!
[Deleted]
Hey folks, I am developing an EA which calls up two custom indicators(that i am attaching with this post), but every time i test it in the strategy tester mt4 just hangs - this does not happen with other EAs that I have tested. Is there any way to incorporate the indicator code into the EA itself,...
[Deleted]
Are there any examples that show how to access indicators from a DLL?
I would very much appreciate some help in understanding how to work out MT4 profit/loss amounts. Lets just say my daily trading goal is to achieve $200 and I am trading on GBP/USD How do I work out lot amounts and how many pips I need? Look forward to any repsonses
  code plz  (3)
hi all . can you help me plz
[Deleted]
Hello, I programmed a simple EA and need the values out of the Custome Indicator. I dont know how to get those values from the Custome Indicator into the EA so I calculate them in EA programm too. I started MT4 twice and compared the print() in both windows and they seemed not to be the same. The...
Can someone please help me with a code that can enable an ea to execute one trade per currency pair per day without constraining chart period to PERIOD_D1 and using "if(Volume[0] > 1) return(0);".
[Deleted]
  DEMO and REAL differences  (114   1 2 3 4 5 ... 11 12)
In this thread I propose to discuss the differences between demo and real. Why - because we are betting real money on this trade. But how do we earn them - that is the question? Why take a very rough approach? The most precise method is better for the uneducated, isn't it? Here we have learned the
Hi Coders! Is it possible to protect the EA to prevent changing the period of the chart? My first opinion is the following code in the deinit() function: int deinit(){int ret=MessageBox("Remove EA?", "Question", MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2);if(ret==IDYES){   Print("Deinit -...
Hi! So I am using what's below for buying or selling. It's a little messy because I am still experimenting, but I was wondering if anyone knew a way to program it so every time ma - ma2 is greater then 0 this condition occurs, then resets and doesn't check again until ma - ma2 is less then 0? If I
Dear all Below shown is an extract of my code. There are two questions I can't solve: 1. when I compile the program, an error message occured: ' Y ' - variable not defined (i.e. the sentense under Close Order Block). However, what I want to do is, assign 0 value to Y after close of order. 2....
[Deleted]
If I have an indicator that has 3 different values for entry. How can i code entry Buy/Sell for each value with a stop on a buy 1 pip below the previous candles low for a Buy, and 1 pip above the previous candle plus spread for a sell. The trade would close on the indication of a signal in the...
Looking at the error code reference table I see 4 different error codes that all have to do with an invalid price/quote. I'm wondering what the difference is between codes 129 (Invalid price), 135 (Price changed), 136 (Off quotes), 138 (Requote) as they seem to all imply there's something wrong with...
[Deleted]
I will appreciate if someone could help with adding alert to this indicator. The indicator draws many colored lines, am focusing in alert when the price touch any of the (2upper red lines) or (the 2lower green lines). Please help, i need it badly
[Deleted]
Hi! How does one get this back so that it will display three trades rather than just one? Is there an adjustment that will let it show an arbitrary number of trades (say 5 or 6)? Not sure how I messed this up... Help is greatly appreciated! :) - John
How to store the bid and ask price of the last 60 seconds in an array and to use them? Thanks!
[Deleted]
Hi I was wondering can someone quicly outline these: 1) PRICE_CLOSE 2) PRICE_OPEN 3) PRICE_TYPICAL Thanks
Dear all I've made the following code: //---- ObjectDelete("TERMNAME2"); ObjectCreate("TERMNAME2", OBJ_LABEL, 0, 0, 0); ObjectSet ("TERMNAME2", OBJPROP_BACK, back); ObjectSet ("TERMNAME2", OBJPROP_CORNER, corner); ObjectSet ("TERMNAME2", OBJPROP_XDISTANCE, xdis + 520);...
[Deleted]
Q1: If my EA opens buy position 3times(ex, #1 1.2222, #2 1.2101, #3 1.1987), I want my EA to figure out the average price of all my opening position(must be 1.2103) Can I get the average figure of all my opening positions by MQL4? Q2: Can I emulate that trailing stop only works for the...
[Deleted]
looking for a coder to make not suse if it would be a indicator or ea that will set buy, sell, ring alerts according to levels set for indicators .
[Deleted]
Hi, is it possible to access the metatrader server from eg. activtrades, alpair, ... via JAVA ? I am looking for a direct connection for snding order signals via java e.g. MT4Connection mt4=new Mt4Connection("IP",Port,Username,Password); not the solution to send a message via java -> dll -> terminal...
Hello, I am a "newbie" to programming and am enjoying learning, even though it is MT4 stuff. I have made an EA to work off my indicator and trade plan and would like to get the trade comment to include the pair so I can sort easily and see which pairs work well and those that don't. This is the line