Codes

Daily Opening EA (needs improvement ideas!) for MetaTrader 4

A slightly different EA based off daily opening breaks

Forum

Can only open EURUSD chart

I don't know where to ask this question, but it's a general MT4 question rather than a MQL4 question. I can only open the EURUSD chart on my MT4 installation. Doing the chart+ button thing only shows EURUSD. Doing File->New Chart also only shows EURUSD. Ideas? I know the simple solutions (like

Predicting EMA Crossover formula help

I found a fun read here ( article ) on predicting EMA crossovers. If I understood it correctly, for EMAs, we can see a recurrence relation between yesterday's EMA and today's EMA, and by shifting this relation forward, we can solve to figure out the approximate price needed for tomorrow to close in

datetime construction

Hi all, I want to create an automatic expiration datetime instead of my usual method of counters and checks. My question is: given datetime CurrTime = blahblah, how do I create datetime ExpTime = CurrTime + x minutes? I looked at the doc to try and figure out how to create a datetime, but it only

Low[] and High[] details please?

Hi all, since trading is closed with my broker for the weekend, I have no way to test this reliably. I want to draw horizontal lines at the highest high and lowest low of the last five completed bars while the 6th bar is in progress. In other words, I want to draw the lines for data from times, say

iFractals jumping values randomly

I'm having a weird problem with the value from iFractals jumping to a wrong value randomly. First, the code, then the problem: int start() { CurrTime = iTime( NULL , 0 , 1 ); if (PrevTime==CurrTime) return ( 0 ); //check for new bar int ns = 0 ; for ( int shift = 1 ; shift < Bars ;

ZigZag iCustom always getting value = 0

Hey again all, I have this code as part of an EA: ZigCurr = iCustom ( NULL , 0 , "ZigZag" , 12 , 5 , 3 , 0 , 1 ); ZigPrev = iCustom ( NULL , 0 , "ZigZag" , 12 , 5 , 3 , 0 , 2 ); I also have the bar shift ranging from 1-49 in another loop. All are giving me ZigCurr and ZigPrev as both 0. One of

OrderSend stop loss question

I'm in the middle of coding my strategy right now, and I'm about to enter the stage where I will start writing the OrderSend parts. Here's my question: Say I make sure only one order is open at a time for this strategy. If I do an OrderSend with a stop loss > 0, then I exit the ticket, what happens