based on alligator indicator signal to buy when the green line crosses the blue and red from bottom to top opens a position on the Buy signal to sell when the green line crosses the red and blue from top to bottom opens a position on the Sell position closed when StopLoss and TakeProfit
no errors during compilation, but there are errors during testing in the strategy tester the first error waiting for the string order did not open opened deleted code containing the string string from compiled no errors ran in the strategy tester works, but opens only Sell position to Buy not want Could you please look and sign off what is wrong in the code
alligator indicator a buy signal when the green line crosses the blue one and the red one crosses from bottom to top, opens a Buy position a sell signal when the green line crosses the red one and the blue one from the top downwards opens a Sell position positions are closed when StopLoss and TakeProfit are reached
no errors during compilation, but when tested in the strategy tester there are errors the first error waiting for the string order did not open deleted code containing string from compiled no errors run in the strategy tester works, but opens only positions on Sell on Buy does not want Couldyou please look and write what is wrong in the code
look at the opening lines:
OrderSend(Symbol(),OP_BUY,Lot,Ask,Slippage,magic,Ask , StopLoss * Point, Ask , TakeProfit * Point);
OrderSend(Symbol(),OP_SELL,Lot,Bid,Slippage,magic,Bid , StopLoss * Point, Bid , TakeProfit * Point);
ZZZEROXXX: Thank you, but I didn't find a solution there, I need to impose bollinger on rsi, you can do it manually, but how to do it programmatically?
Bollinger is MA pushed up and down on StdDev. You can do it in two ways.
1. If you are happy with the integer deviation change of Deviat, you can use the iBandsOnArray function
2. If you also need to count decimal fractions of Deviat, you will have to use the iMAOnArray and iStdOnArray functions
It looks as follows in the code:
#property indicator_separate_window#property indicator_buffers 4#property indicator_minimum 0#property indicator_maximum 100#property indicator_color1 SkyBlue#property indicator_color2 LimeGreen#property indicator_color3 LimeGreen#property indicator_color4 LimeGreen#property indicator_style2 STYLE_DOTexternint rsiPeriod=14;
externint rsiPrice=PRICE_CLOSE;
externint bbPeriod=20;
externint bbShift=0;
int bbMethod=MODE_SMA;
externdouble bbDeviat=2;
double rsi[], ma[], up[], dn[], stdev[];
//------------------------------------------------------------------ initint init()
{
int i=0;
SetIndexBuffer(i, rsi); SetIndexStyle(i, DRAW_LINE); SetIndexLabel(i, "RSI"); i++;
SetIndexBuffer(i, ma); SetIndexStyle(i, DRAW_LINE); SetIndexLabel(i, "MA"); i++;
SetIndexBuffer(i, up); SetIndexStyle(i, DRAW_LINE); SetIndexLabel(i, "UP"); i++;
SetIndexBuffer(i, dn); SetIndexStyle(i, DRAW_LINE); SetIndexLabel(i, "DN"); i++;
IndicatorBuffers(5);
SetIndexBuffer(i, stdev); SetIndexStyle(i, DRAW_NONE); // добавочный буфер расчетаreturn(0);
}
//------------------------------------------------------------------ startint start()
{
int count=IndicatorCounted(); if (count<0) return; // если ошибка расчетаint lim=Bars-count; if (lim>1) lim=Bars-1; // если нерасчитано более 1 бара, то полный пересчет// 1. получаем массив RSIfor (int i=lim; i>=0; i--) rsi[i]=iRSI(Symbol(), Period(), rsiPeriod, rsiPrice, i);
// 2. строим на основе RSI - МА (средняя линия болинджера), StdDev и Верхнюю и Нижнюю границу Боллинджераfor (i=lim; i>=0; i--)
{
ma[i]=iMAOnArray(rsi, 0, bbPeriod, bbShift, bbMethod, i); // средняя линия
stdev[i]=iStdDevOnArray(rsi, 0, bbPeriod, bbShift, bbMethod, i); // отклонение
up[i]=ma[i]+bbDeviat*stdev[i]; // верхняя граница
dn[i]=ma[i]-bbDeviat*stdev[i]; // нижняя граница
}
return(0);
}
When you implement your "don't punctuate" bias, don't be surprised that your questioning posts will be frequently ignored. People also have a tendency to respect themselves. They also have a habit of respecting their own language.
That's right. It hurts the eye and makes you want to turn away. And doubts arise anyway - "about my literacy (education)".
When you implement your "don't punctuate" bias, don't be surprised that your questioning posts will be frequently ignored.
People also have a tendency to respect themselves. They also have a habit of respecting their own language.
I, for example, still don't know where to put them, I only know that there should be a dot at the end - I know that for sure. Russian is the hardest language. But it has the advantage that you can express itself so that any other language would be the envy of especially the swear language, it's short and simple, I sometimes use it when someone is having difficulty understanding you swear and everyone immediately understands everything and no one comes up to you with stupid questions during the day.
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.
Help make sense of this Expert Advisor
based on alligator indicator
signal to buy when the green line crosses the blue and red from bottom to top opens a position on the Buy
signal to sell when the green line crosses the red and blue from top to bottom opens a position on the Sell
position closed when StopLoss and TakeProfit
no errors during compilation, but there are errors during testing in the strategy tester
the first error waiting for the string order did not open opened deleted code containing the string string from compiled no errors ran in the strategy tester
works, but opens only Sell position to Buy not want
Could you please look and sign off what is wrong in the code
Help me deal with this EA
alligator indicator
a buy signal when the green line crosses the blue one and the red one crosses from bottom to top, opens a Buy position
a sell signal when the green line crosses the red one and the blue one from the top downwards opens a Sell position
positions are closed when StopLoss and TakeProfit are reached
no errors during compilation, but when tested in the strategy tester there are errors
the first error waiting for the string order did not open deleted code containing string from compiled no errors run in the strategy tester
works, but opens only positions on Sell on Buy does not want
Couldyou please look and write what is wrong in the code
look at the opening lines:
Now look at the specification of the OrderSend function itself (see description here https://docs.mql4.com/ru/trading/OrderSend)
and check if the parameters are still there
Let there be no doubt about my literacy
Not putting punctuation marks is my binge, that's all.
When you put your "don't punctuate" binge into practice, don't be surprised to find your questioning posts frequently ignored.
People also have a habit of respecting themselves.
They also have a habit of respecting their own language.
iCustom()
https://book.mql4.com/ru/samples/sharedThank you, but I didn't find a solution there, I need to impose bollinger on rsi, you can do it manually, but how to do it programmatically?
Bollinger is MA pushed up and down on StdDev. You can do it in two ways.
1. If you are happy with the integer deviation change of Deviat, you can use the iBandsOnArray function
2. If you also need to count decimal fractions of Deviat, you will have to use the iMAOnArray and iStdOnArray functions
It looks as follows in the code:
When you implement your "don't punctuate" bias, don't be surprised that your questioning posts will be frequently ignored.
People also have a tendency to respect themselves.
They also have a habit of respecting their own language.
And doubts arise anyway - "about my literacy (education)".
In the code, it looks like this:
When you implement your "don't punctuate" bias, don't be surprised that your questioning posts will be frequently ignored.
People also have a tendency to respect themselves.
They also have a habit of respecting their own language.