Spectrometr refinement - page 6

 
Blondi_ >>:


Нет ну человека понять можно... Вот у Вас например в жизни крали идеи? :)

They steal from everyone, from me and him and you too, if it got on the Internet all think it is no longer yours, and there is no guarantee that someone will not write your name on your creation, but I've seen many of their advisers under other people's names, you look at the code ha and there's your creation))) - so i'm okay with that.

 
qwerewq писал(а) >>

They steal from everyone, from me and him and from you too, if it got on the Internet all think it is no longer yours, and there is no guarantee that someone will not write your name on your creation, but I've seen many of their advisers under other people's names, you look at the code ha and there's your creation))) - so I'm okay with that.

Philosophical question, however, touched on :)

 

The left edge is rigidly bound to the extremum, and the whole indicator "stretches" with the arrival of new bars and the harmonics amplitudes change. So, when the amplitude of the second harmonic reaches its maximum, on its bend towards the main trend, we should look for the entry point. But the trouble is that corrections do not always have the "correct" structure.

To add an indicator to the chart, first install a vertical line, copy the binding date from its properties and then apply the indicator and paste this date in the settings.

Files:
spectrometr.mq4  14 kb
 
qwerewq писал(а) >>

They steal from everyone, from me and him and you too, if it got on the Internet all think it is no longer yours, and there is no guarantee that someone will not write your name on your creation, but I've seen many of their advisers under other people's names, you look at the code ha and there's your creation))) - so I'm okay with that.

I don't give a shit either.

 
Integer писал(а) >>

I don't give a shit either.

I still need to settle this "amicably". otherwise a "nasty residue" will remain... in ANY case ... ( at least within the forum )

 

You put it on the Internet, you make it public. Anonymised. // scary word)))

It's a matter of purpose: either you plan to buy beer for the Nobel Prize (then yes - authorship!!!), or for something else. On trading, for example.))

(I don't even sign mine that way - whoever needs it will understand it - sapienti-mutual-sat, and whoever doesn't - well, fuck it).

 

Physics, however ))))

 
Hi all! Got there.... (Sighs) Traffic:) All right people! We found out that stealing is not good, we found out that Mr. Integer will not be offended, but I, for example, was not satisfied with )))). It seems to me that Indyk should be modified to auto-select parameters. The best result comes out with two extrema... What do you think?
 
MVV >>:

Там левый край имеет жесткую привязку к экстремуму, при этом весь индикатор "растягивается" с приходом новых баров и меняются амплитуды гармоник. Вот когда амплитуда второй гармоники станет максимальной, на её перегибе в сторону основного тренда и надо искать точки входа. Но вся беда в том, что коррекции не всегда имеют "правильную" структуру.

Для добавления индикатора к графику сначала установите вертикальную линию, из её свойств скопируйте дату привязки, а затем накладывайте индикатор и в настройках вставьте эту дату.


I looked it up, but again, you have to move it with your hands and you want a machine :)))
 

Help me re-do a simple EA, I've been struggling for a week!!!! Or write it again, all EAs are too complicated and I can't tweak it for me!

I want to add to this EA an MACD indicator, which sends its BUY and SELL signals and the EA has to do both at the same time. There should be not more than three open BUY and three open SELL orders. All orders should be closed by stoploss and takeprofit only, and not by force of the Expert Advisor.

//--------------------------------------------------------------------
extern int     period_EMA           = 28,
               period_WMA           = 8 ,
               stoploss             = 50,
               takeprofit           = 50,
               risk                 = 10;
double  LOT;
//--------------------------------------------------------------------
double SL, TP;
int TimeBar; //глобальная переменная
//--------------------------------------------------------------------
int start()
{
   if ( TimeBar==Time[0]) return(0);
   if ( TimeBar==0) { TimeBar=Time[0];return(0);}//первый запуск программы
   double EMA0 = iMA(NULL,0, period_EMA,0,MODE_EMA, PRICE_OPEN,0);
   double WMA0 = iMA(NULL,0, period_WMA,0,MODE_LWMA,PRICE_OPEN,0);
   double EMA1 = iMA(NULL,0, period_EMA,0,MODE_EMA, PRICE_OPEN,1);
   double WMA1 = iMA(NULL,0, period_WMA,0,MODE_LWMA,PRICE_OPEN,1);
   if ( EMA0< WMA0&& EMA1> WMA1) //Buy
   {
      TimeBar=Time[0];                            
      TP  = Ask + takeprofit*Point;
      SL  = Ask - stoploss*Point;     
      LOT = LOT( risk,1);
      CLOSEORDER("Sell");
      OPENORDER ("Buy");
   }
   if ( EMA0> WMA0&& EMA1< WMA1) //Sell
   {
      TimeBar=Time[0];                            
      TP = Bid - takeprofit*Point;
      SL = Bid + stoploss*Point;            
      LOT = LOT( risk,1);
      CLOSEORDER("Buy");
      OPENORDER ("Sell");
   }
return(0);
}
//--------------------------------------------------------------------
void CLOSEORDER(string ord)
{
   for (int i=OrdersTotal()-1; i>=0; i--)
   {                                               
      if (OrderSelect( i, SELECT_BY_POS, MODE_TRADES)==true)
      {
         if (OrderSymbol()!=Symbol()) continue;
         if (OrderType()==OP_BUY && ord=="Buy")
            OrderClose(OrderTicket(),OrderLots(),Bid,3,CLR_NONE);// Close Buy
         if (OrderType()==OP_SELL && ord=="Sell")
            OrderClose(OrderTicket(),OrderLots(),Ask,3,CLR_NONE);// Close Sell
      }   
   }
}
//--------------------------------------------------------------------
void OPENORDER(string ord)
{
   int error;
   if ( ord=="Buy" ) error=OrderSend(Symbol(),OP_BUY, LOT,Ask,2, SL, TP,"", 1,3);
   if ( ord=="Sell") error=OrderSend(Symbol(),OP_SELL, LOT,Bid,2, SL, TP,"",-1,3);
   if ( error==-1) //неудачная покупка OK
   {  
      ShowERROR( error,0,0);
   }
return;
}                  
//--------------------------------------------------------------------
void ShowERROR(int Ticket,double SL,double TP)
{
   int err=GetLastError();
   switch ( err )
   {                  
      case 1:                                                                               return;
      case 2:   Alert("Нет связи с торговым сервером   "              , Ticket," ",Symbol());return;
      case 3:   Alert("Error  неправильные параметры   Ticket ",       Ticket," ",Symbol());return;
      case 130: Alert("Error близкие стопы   Ticket ",                 Ticket," ",Symbol());return;
      case 134: Alert("Недостаточно денег   ",                         Ticket," ",Symbol());return;
      case 146: Alert("Error Подсистема торговли занята ",             Ticket," ",Symbol());return;
      case 129: Alert("Error Неправильная цена ",                      Ticket," ",Symbol());return;
      case 131: Alert("Error Неправильный объем ",                     Ticket," ",Symbol());return;
      case 4051:Alert("Error Недопустимое значение параметра функции ", Ticket," ",Symbol());return;
      case 4105:Alert("Error Ни один ордер не выбран ",                Ticket," ",Symbol());return;
      case 4063:Alert("Error Ожидается параметр типа integer ",        Ticket," ",Symbol());return;
      case 4200:Alert("Error Объект уже существует ",                  Ticket," ",Symbol());return;
      default:  Alert("Error  " , err,"   Ticket ",                     Ticket," ",Symbol());return;
   }
}
//--------------------------------------------------------------------
double LOT(int risk,int ord)
{
   double MINLOT = MarketInfo(Symbol(),MODE_MINLOT);
   LOT = AccountFreeMargin()* risk/100/MarketInfo(Symbol(),MODE_MARGINREQUIRED)/ ord;
   if ( LOT>MarketInfo(Symbol(),MODE_MAXLOT)) LOT = MarketInfo(Symbol(),MODE_MAXLOT);
   if ( LOT< MINLOT) LOT = MINLOT;
   if ( MINLOT<0.1) LOT = NormalizeDouble( LOT,2); else LOT = NormalizeDouble( LOT,1);
   return( LOT);
}
//--------------------------------------------------------------------


	          
Reason: