Had another play. It looked like there was a function defined inside the start function, but then there was an if() function just below the //functions label.
Did some cut & pastes to where I guess they might fit.
Took magicnumber out of data going to countorders function. The function is only expecting 1 thing to be sent to it, thats Type.
Oh - changed name to CountedOrders only cause I was guessing at the problem.
Does compile now, but with 4 warnings:
Function "CheckForExistingHedge" is not referenced and will be removed from exp-file (I think the compiler means ex4 file)
Function "AreHedgeAndOriginalAtBreakeven" is not referenced and will be removed from exp-file
Function "HedgeTrade" is not referenced and will be removed from exp-file
Function "DetermineTrendDirection" is not referenced and will be removed from exp-file
0 error(s), 4 warning(s)
Up to you to add bits in to call these functions from where you want to.
At the moment they are basicly redundant code, but I suspect you will want to use them.
Also carved back the error printing line to real basic, cause it is trying to call a function that puts the error text up, but you haven't got that function coded. Sorry couldn't find it among my junk. I have it somewhere.
Interested in how this progresses as an ea. Have learnt heaps trying to track the errors, thanks for the opportunity to play with your ea.
Ops just about forgot to post the edited ea.
cheers bt2
