Good afternoon, could you tell me if I needthe Awesome Oscillator in a scoop, its parameters are constant and it doesn't need to be prescribed as a MA?
Ребята, ну почему дает ошибку закрытия, при чем на двух разных терминалах..
: OrderClose error 4107
: invalid price 1.48566000 for OrderClose function
причем дают одинаковую ошибку все три варианта: и кстати какой из них наиболее правильный?
Is the order pre-selected? Because all these functions "OrderTicket(),OrderLots(),OrderClosePrice()" only work when the order is selected by OrderSelect().
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
What is so funny about it, please explain?
All you have to do is read some popular literature and the question goes away. Your question means you want everything on a silver platter.
Достаточно почитать популярную литературу и вопрос сам собой закроется. Ваш вопрос означает что Вам нужно все подать на блюдечке с голубой каемочкой.
Excuse me, please, I read popular literature, but unfortunately I haven't found the answer to this question there either.
Would you mind giving at least the title of the book and the name of the author.
Thank you very much in advance!
Нужно ли его объявлять и в каком месте прописывать? и как на него ссылаться в советнике? как AO или Awesome Oscillator ?
Good afternoon friends.
Confused in the code, please advise what needs to be corrected.
I have found LeManTrend indicator on this forum.
I want to modify it a bit - add smoothing moving averages on two lines in indicator.
I prepare arrays ma[] and ma2[] for this purpose.
But when I add this indicator to the chart, "nothing is drawn"...
what is the problem?
//----
string Indicator_Name = "ind1";
int Objs = 0;
//----
#property indicator_separate_window
#property indicator_buffers 4
//----
int Bars.Count = 0;
extern int Min = 13;
extern int Midle = 21;
extern int Max = 34;
extern int PeriodEMA = 3;
//---- Буферы
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double TempBuffer1[];
double TempBuffer2[];
double ma[];
double ma2[];
int method_ma = 0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorShortName(Indicator_Name);
int cur = 0;
int st = 23;
//-------------------------------------------
int width = 2;
SetIndexStyle(0, DRAW_LINE, DRAW_LINE, width, Yellow);
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexStyle(1, DRAW_LINE, DRAW_LINE, 2, Blue);
SetIndexBuffer(1, ExtMapBuffer2);
SetIndexBuffer(2, ma);
SetIndexStyle(2, DRAW_LINE, DRAW_LINE, 1, Red);
SetIndexBuffer(3, ma2);
SetIndexStyle(3, DRAW_LINE, DRAW_LINE, 1, Teal);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
if (IndicatorCounted()<0) return(-1);
limit=Bars-IndicatorCounted();
if (Bars.Count>0 && limit>Bars.Count)
limit=Bars.Count;
int i = limit;
//----
while(i >= 0)
{
double High1 = iHigh(NULL, 0, iHighest(NULL, 0, MODE_HIGH, Min,i+1));
double High2 = iHigh(NULL, 0, iHighest(NULL, 0, MODE_HIGH, Midle,i+1));
double High3 = iHigh(NULL, 0, iHighest(NULL, 0, MODE_HIGH, Max,i+1));
TempBuffer1[i] = ((High[i]-High1)+(High[i]-High2)+(High[i]-High3));
double Low1 = iLow(NULL, 0, iLowest(NULL, 0, MODE_LOW, Min, i+1));
double Low2 = iLow(NULL, 0, iLowest(NULL, 0, MODE_LOW, Midle, i+1));
double Low3 = iLow(NULL, 0, iLowest(NULL, 0, MODE_LOW, Max, i+1));
TempBuffer2[i] = ((Low1-Low[i])+(Low2-Low[i])+(Low3-Low[i]));
i--;
}
//---- основной цикл
for( i = 0; i < limit; i++)
{
if (PeriodEMA > 0 )
{
ExtMapBuffer1[i] = -iMAOnArray(TempBuffer1,Bars,PeriodEMA,0,MODE_EMA,i);
ExtMapBuffer2[i] = -iMAOnArray(TempBuffer2,Bars,PeriodEMA,0,MODE_EMA,i);
}
else
{
ExtMapBuffer1[i] = TempBuffer1[i];
ExtMapBuffer2[i] = TempBuffer2[i];
}
}
//====================================================================
//--------------------------------------------------------------------
//элементы скользящих средних
for(i = 0; i < limit; i++)
{
ma[i]=iMAOnArray(ExtMapBuffer1,0,8,0,method_ma,i);
ma2[i]=iMAOnArray(ExtMapBuffer2,0,8,0,method_ma,i);
}
//====================================================================
//----
return(0);
}
Attached is the original LeManTrend indicator
Guys, why does it give a close error, and on two different terminals...
: OrderClose error 4107
: invalid price 1.48566000 for OrderClose function
All three variants give the same error: which of them is more correct?
Guys, why does it give a close error, and on two different terminals...
: OrderClose error 4107
: invalid price 1.48566000 for OrderClose function
By the way, which of the three options is the right one?
I guess I have to pre-select the order.
Ребята, ну почему дает ошибку закрытия, при чем на двух разных терминалах..
: OrderClose error 4107
: invalid price 1.48566000 for OrderClose function
причем дают одинаковую ошибку все три варианта: и кстати какой из них наиболее правильный?
Is the order pre-selected? Because all these functions "OrderTicket(),OrderLots(),OrderClosePrice()" only work when the order is selected by OrderSelect().