I have a question about indicators with stochastic at levels 20 and 80. Or MACD with level 0. so the question is how to take the value of the indicator when it is below 20 or above 80, the main line and the signal line.Or crossed behind these levels.Indicator values, I think I've got, but then what to do with them do not know.
denis77515: Gentlemen programmers, explain pliz stochastic indicators have levels 20, 80. Or MACD with level 0. I think i have got the indicator value, but i don't know what to do with it.
double close_price(int nomer_bara)
{
if(nomer_bara<1)
{
Alert("нельзя анализировать текущий бар");
}
else
{
if(iClose(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara)<iHigh(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara)/3)//возвращает 1/3 если цена текущего бара закрылась ниже 1/3 его спреда
{
return(1/3);
}
if(iClose(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara)>iHigh(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara)/3&&(iClose(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara)<iHigh(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara)*2)/3)//возвращает 2/3 если цена текущего бара закрылась ниже 2/3 и выше 1/3 его спреда
{
return(2/3);
}
if((iClose(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara)>(iHigh(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara))*2)/3&&iClose(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara)<iHigh(Symbol(),NULL,nomer_bara)-iLow(Symbol(),NULL,nomer_bara))//возвращает 1 если цена текущего бара закрылась выше 2/3 его спреда
{
return(1);
}
}
}
if(close_price(1)==1/3)// в случае если цена закрылась внизу то нарисовать линию на этом баре
{
SetVLine(Red, "", Time[1], STYLE_SOLID, 2);
}
и так вся проблема заключается в том что линия рисуется на каждом баре не пойму какого черта... помогите пожалуйста
the line should be drawn on the bar where the price closed at the bottom, i.e. 1/3 bar
Hi! Going to reinstall Windows, but when I move the EAs folder to harddrive, the EAs written recently are gone! Any advice on what to do?
*I can not save the code in a document and then re-create them, because there are a lot of them, and I do not want to lose data because of a possible human factor :)
Good day! Please help!!! The programmer who wrote the Expert Advisor disappeared... I had to finish it myself... I had to rewrite it myself, and i still have one function to implement. My Expert Advisor is working on breakdowns of support and resistance levels + Fibo levels as a second signal, respectively, in Fibo. As a result, I get a signal, but it did not work due to some restrictions or not enough points to set the minimum Take Profit. Please help, advise or throw link to advisor.... I am looking for a restriction to enter the trade. To buy the price has to break the level from bottom to top only, and for sell from top to bottom. Thanks so much in advance!!!!!
Guys, please help, there is a function that returns the lot of the last open order (which is not yet closed). Can you modify it to return the lot of the next-to-last open order (also not yet closed)? Just do it without using arrays...
double FindLastLots (int otype)
{
double oldopenprice,oldlots;
int oldticket;
ticket = 0;
for (int i = OrdersTotal()-1; i>=0; i--)
{
if (OrderSelect(i, SELECT_BY_POS,MODE_TRADES))
{
if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic && OrderType() == otype)
{
oldticket = OrderTicket();
if (oldticket>ticket)
{
oldlots = OrderLots();
ticket = oldticket;
}
}
}
}
return (oldlots);
}
Guys, please help, there is a function that returns the lot of the last open order (which is not yet closed). Can you modify it to return the lot of the next-to-last open order (also not yet closed)? Only do it without using arrays...
You don't have arrays here either. The code is not very reliable. You're looking for the last one in the list of open orders. IMHO, binding to this is not very reliable. The most reliable way to find the last open order is by its open time (it is the lowest of all)
so the question is how to take the value of the indicator when it is below 20 or above 80, the main line and the signal line.Or crossed behind these levels.Indicator values, I think I've got, but then what to do with them do not know.
Stoh=iStochastic(Symbol(),PERIOD_H1,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_MAIN,0);
StohSignal=iStochastic(Symbol(),PERIOD_H1,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_SIGNAL,0)
Macd=iMACD(Symbol(),PERIOD_H4,fast_ema_period,slow_ema_period,signal_period,PRICE_CLOSE,MODE_MAIN,0);
MacdSignal=iMACD(Symbol(),PERIOD_H4,fast_ema_period,slow_ema_period,signal_period,PRICE_CLOSE,MODE_SIGNAL,0);
Gentlemen programmers, explain pliz stochastic indicators have levels 20, 80. Or MACD with level 0.
I think i have got the indicator value, but i don't know what to do with it.
Stoh=iStochastic(Symbol(),PERIOD_H1,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_MAIN,0);
StohSignal=iStochastic(Symbol(),PERIOD_H1,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_SIGNAL,0);
Macd=iMACD(Symbol(),PERIOD_H4,fast_ema_period,slow_ema_period,signal_period,PRICE_CLOSE,MODE_MAIN,0);
MacdSignal=iMACD(Symbol(),PERIOD_H4,fast_ema_period,slow_ema_period,signal_period,PRICE_CLOSE,MODE_SIGNAL,0);
Study Guide
although it's probably too late, we're updating today.
example from the tutorial
Hi! Going to reinstall Windows, but when I move the EAs folder to harddrive, the EAs written recently are gone! Any advice on what to do?
*I can not save the code in a document and then re-create them, because there are a lot of them, and I do not want to lose data because of a possible human factor :)
Guys, please help, there is a function that returns the lot of the last open order (which is not yet closed). Can you modify it to return the lot of the next-to-last open order (also not yet closed)? Just do it without using arrays...
Guys, please help, there is a function that returns the lot of the last open order (which is not yet closed). Can you modify it to return the lot of the next-to-last open order (also not yet closed)? Only do it without using arrays...
Is there any tricky way to call a trend line with a hotkey?