Newbie trying to figure out really simple problem
read the documentaion, you have to split between oninit and ontick
amando:
read the documentaion, you have to split between oninit and ontick
read the documentaion, you have to split between oninit and ontick
I'm a newbie that paid my registration fee and recently started trading but can't request my payment after satisfying my 5% qualification.
Andrew Quallis:
I'm a newbie that paid my registration fee and recently started trading but can't request my payment after satisfying my 5% qualification.
I'm a newbie that paid my registration fee and recently started trading but can't request my payment after satisfying my 5% qualification.
What registration fee?
What are you talking about?
Andrew Quallis:
I'm a newbie that paid my registration fee and recently started trading but can't request my payment after satisfying my 5% qualification.
I'm a newbie that paid my registration fee and recently started trading but can't request my payment after satisfying my 5% qualification.
You are probably talking about some broker, so contact them, we can't help you here.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, everyone,
I started learning how to program in MQL5 today and I'm trying to make a simple moving average cross expert advisor. It compiles without errors, but when I try to test it in the strategy tester it does not seem to work, it stays still. I'm not sure if the problem is in the code or in my strategy tester settings. Below is the code:
void OnTick()
{
double mymovingaveragearray1 [], mymovingaveragearray2[],mymovingaveragearray3[];
int movingaveragedefinition1 = iMA (_Symbol,_Period, 05,0,MODE_EMA,PRICE_CLOSE);
int movingaveragedefinition2 = iMA (_Symbol,_Period, 75,0,MODE_EMA,PRICE_CLOSE);
int movingaveragedefinition3 = iMA (_Symbol,_Period, 85,0,MODE_EMA,PRICE_CLOSE);
ArraySetAsSeries (mymovingaveragearray1, true);
ArraySetAsSeries (mymovingaveragearray2, true);
ArraySetAsSeries (mymovingaveragearray3, true);
CopyBuffer(movingaveragedefinition1,0,0,3,mymovingaveragearray1);
CopyBuffer(movingaveragedefinition2,0,0,3,mymovingaveragearray2);
CopyBuffer(movingaveragedefinition3,0,0,3,mymovingaveragearray3);
if(
(mymovingaveragearray1[0]>mymovingaveragearray2[0])
&&(mymovingaveragearray1[0]>mymovingaveragearray3[0])
&&(mymovingaveragearray1[3]<mymovingaveragearray2[3])
&&(mymovingaveragearray1[3]<mymovingaveragearray3[3])
)
{Comment ("Buy");
}
if(
(mymovingaveragearray1[0]<mymovingaveragearray2[0])
&&(mymovingaveragearray1[0]<mymovingaveragearray3[0])
&&(mymovingaveragearray1[3]>mymovingaveragearray2[3])
&&(mymovingaveragearray1[3]>mymovingaveragearray3[3])
)
{Comment ("Sell");
}
}
Thank you very much