Umm... I mean code!
I have been thinking about learning this coding game for a while, and when a friend was quoted by one of those Russian online coders over $500 to code a very simple system I told him I would give it a go.
and I failed...
(Wife would have added "naturally" at the end of that line)
I have created an EA from one I have been using for a while (may have saved me a hundred hours if I used the template Steve posted here) and it compiled for me (after a million errors)
But it wont take trades
Which I assume means my logic is wrond.
this is what I have at the moment
Code: Select all
// Open a BUY when the price is above ALL 3 SMAs, and the two most recent completed bars have an open below their close, and the current bar has 2 pip movement from open in the LONG direction.
// My attempt to show BUY
if(Open[2] < Close[2] && Open[1] < Close[1] && Open[0] < (Open[0] + 2) && SMA1_Period < Open[2] && SMA2_Period < Open[2] && SMA3_Period < Open[2])
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,Ask-StopLossPips,Ask+TakeProfitPips,"Viks_Three_Little_Ducks",MagicNumber,0,Green);
if(ticket<0)
{it reads like I would think it
but that doesnt mean the Empty4 platform has a clue what I mean
Someone want to show me the errors of my ways
Appreciate any help
Thanks
Nufty