[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 923
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
tried it, it doesn't work!
You have int First();
You need int First()
{
//-------- Function body ----------
return (0);
}
Where does the above need to be described?
error
Where does the above need to be described?
error
Where should the above be described?
error
You don't need to describe it anywhere. It is not an error, but a warning that the function is not used anywhere in the EA and it can be removed.
After First(); function is called in the EA body, there will be no more such a warning.
Is there the smallest code that determines where the price is, above Moving or below it?
double MA1=iMA(Symbol(), Period(), PeriodMA, 0, MODE_SMA, PRICE_CLOSE, 1);
double pa=MarketInfo(Symbol(), MODE_ASK);
double pb=MarketInfo(Symbol(), MODE_BID);
int pt=MarketInfo(Symbol(), MODE_POINT);
int dg=MarketInfo(Symbol(), MODE_DIGITS);
---------------------------------------- Для Buy -------------------------------------------------
if(NormalizeDouble(pa, dg)>NormalizeDouble(MA1, dg)) {Price is higher than MA1}
if (NormalizeDouble(pa, dg)<NormalizeDouble(MA1, dg)) {Price is lower than MA1}
else if (NormalizeDouble(pa, dg)==NormalizeDouble(MA1, dg)) {Price is equal to MA1}
----------------------------------------------------------------------------------------------------
---------------------------------------- Для Sell ------------------------------------------------
if (NormalizeDouble(pb, dg)>NormalizeDouble(MA1, dg)) {Price is higher than MA1}
if (NormalizeDouble(pb, dg)<NormalizeDouble(MA1, dg)) {Price is lower than MA1}
else if (NormalizeDouble(pb, dg)==NormalizeDouble(MA1, dg)) {Price is equal to MA1}
----------------------------------------------------------------------------------------------------
The simplest one is first class middle school maths
double MA1=iMA(Symbol(), Period(), PeriodMA, 0, MODE_SMA, PRICE_CLOSE, 1);
double pa=MarketInfo(Symbol(), MODE_ASK);
double pb=MarketInfo(Symbol(), MODE_BID);
int pt=MarketInfo(Symbol(), MODE_POINT);
int dg=MarketInfo(Symbol(), MODE_DIGITS);
---------------------------------------- Для Buy -------------------------------------------------
if (NormalizeDouble(pa, dg)>NormalizeDouble(MA1, dg)) {Price is higher than MA1}
if (NormalizeDouble(pa, dg)<NormalizeDouble(MA1, dg)) {Price is lower than MA1}
else if (NormalizeDouble(pa, dg)==NormalizeDouble(MA1, dg)) {Price is equal to MA1}
----------------------------------------------------------------------------------------------------
---------------------------------------- Для Sell ------------------------------------------------
if (NormalizeDouble(pb, dg)>NormalizeDouble(MA1, dg)) {Price is higher than MA1}
if (NormalizeDouble(pb, dg)<NormalizeDouble(MA1, dg)) {Price is lower than MA1}
else if (NormalizeDouble(pb, dg)==NormalizeDouble(MA1, dg)) {Price is equal to MA1}
----------------------------------------------------------------------------------------------------
The simplest one is first grade maths in high school
Artem. And if you think about it
Artem. And if you think about it...
Hello, Victor. You know, I've got my mind on a specific order. The first thing that popped into my head is what I wrote. I'm not the one who has to think further. The main thing is to set the direction of thought... :)
Just correct it, so that a man doesn't get lost... :)
Right... It would be more correct to compare the difference in these values, but we'll leave that to the questioner... :)
The main thing - the direction of thought is given...