Forum

Heiken Ashi Smoothed without using iCustom

Hi, I'm trying to use the heiken ashi without using the iCustom call, am I on the right lines with this: int MaMetod= 2 ; int MaPeriod = 24 ; int MaMetod2 = 3 ; int MaPeriod2= 2 ; double maOpen1= iMA ( NULL , 0 ,MaPeriod, 0 ,MaMetod, PRICE_OPEN , 1 ); double maClose1= iMA ( NULL , 0

Quick but curious

Hi I'm going through an old EA I found on a post from some years back, I've come to this and don't understand what logic is behind it. extern string entrylogics= "Entry Logics" ; extern int timeframe= 0 ; extern int period= 5 ; extern int shift= 2 ; // bar in the past to take in

Indi Average

Hi, I'm trying to code part of an EA that return an indicators average reading.. I've one primitive attempt which works and another which does not, can anyone point me in the right direction to get the broken code into some semblance of sense.. double MACDAVERAGEPOSITIVE, MACDAVERAGENEGATIVE;

EA Compilation Problem

Hi, any help will be dearly appreciated. So I had tested a few strategies out which ran on a single Symbol, and analysed data only from a single Period. It was coded so that positions can only be open when there is no open positions of that type already open. while (OMNS5 < T) { when a position

Confusion reigns supreme

bool MySelect( int iWhat, int eSelect, int ePool= MODE_TRADES ) // MySelect bool initiation, value given below // so I'm thinking to add in a myselect function for Buy and one for Sell.. as i simply dont understand 'return(OrderType() <= OP_SELL);' { if (! OrderSelect (iWhat, eSelect, ePool) )

Two EA's when amalgamated don't return the expected value

Hi, I've got two different EA's both profitable over 2016 on GBPJPY on the 1H timeframe, one returns 267.51 and the other 233.54 yet when amalgamated into a single EA that uses both trading strategies simultaneously (whilst allowing the extra positions to be opened) the return was 269.97. I had

Stop loss modify not working for sells

Hi, I've been woring on an ea with a SL function that is set after a period of time has elapsed AND an amount of pips profit it cleared.. it works for OrderModify OP=BUY but not for OP=SELL, I think I'm just missing something simple but cant seem to grasp what it is.. anyhow, here's the code; else

MQL4 EA help - BUY orders work whilst SELL orders don't.. please help!

I'm baffled by this problem, and after trying everything I can think of I realise I need some help! Basically my EA will happily open buy orders but refuses to open sell orders , i can't work out why.. Here's the SC int StopLossPriceB = StopLossPips1; int TakeProfitPriceB = TakeProfitPips; double

MQL4 coding

Hi im somewhat new to coding and reached a problem using void ontick() . Before it was simply int Start() , but i want the EA to recalculate after each tick, therefor ontick seems perfect, however, the return(0) operation is now returning an error of " 'return' - 'void' function returns a value "