Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 127
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
So the suggestion is to take an indicator with a library, connect it to ex4
and after that everything will work?
I mean the logic itselfSo the suggestion is to take an indicator with a library, connect it to ex4
and then everything will work?
Thanks in advance!
extern double Lots = 0.1;
extern double Profit = 50;
extern int Step = 30;
extern int Magic = 6677;
extern int Slippage = 5;
extern int maPeriod =100;
extern int maShift =1;
double ma, FindLastBuyPrice, price;
//------------------------------------------------------------------
//___ПРОВЕРКА_ЗНАКОВ_ПОСЛЕ_ТОЧКИ___
//------------------------------------------------------------------
int OnInit()
{
if (Digits == 3 || Digits == 5)
{
Step *= 10;
Slippage *= 10;
}
return(INIT_SUCCEEDED);
}
//---------------------------------------------
void OnDeinit(const int reason)
{
}
//------------------------------------------------------------------
//
//------------------------------------------------------------------
void OnTick()
{
ma = iMA(Symbol(),0,maPeriod, maShift, MODE_SMA, PRICE_CLOSE, 0);
if (CountBuy()==0 && CountSell() == 0 && Bid < ma)//
{
if (OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, 0, 0, "", Magic, 0, Red) < 1)
Print ("Неудалось открыть ордер на Продажу");
}
if (CountBuy()==0 && CountSell() == 0 && Ask < ma)
{
if (OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, 0, 0, "", Magic, 0, Blue) < 1)
Print ("Неудалось открыть ордер на Покупку");
}
}
//+------------------------------------------------------------------+
D highlighted what was missing
Don't be lazy, follow the link to the documentation, read it carefully and you will understand everything.
It doesn't say anything about calculating the indicator in the EA itself, and I've seen that too.
I saved in csv format, it doesn't work
people, can you please tell me how to make the graphs in the terminal to save the markup after switching on again?
I saved it in csv format, it doesn't work.
What kind of markup are we talking about?
after I turn on the terminal again, it all disappears from the charts.
I must have saved it somehow.
I pressed "File-Save As" and saved it, but it didn't help me.
I spent a lot of time yesterday drawing the markup on the charts, but today I turned on the terminal and it is gone(
about the markings on the charts, support/resistance levels for example.
When I turn on the terminal again, all of this disappears from the charts.
I think I have to save it somehow.
I've tried to save it by pressing "File-Save As" button, but it did not help me.
I spent a lot of time yesterday drawing the markup on charts, and today I turned on the terminal and it's gone(