MQL5

 

Hallo,

ich habe wiedereinmal ein paar Fragen, und zwar:

1. Wieso kommt das Programm nach einer  geschlossenen Position in eine Schleife 3d_oscilatorsign: https://www.mql5.com/en/code/14530

double TrailingStop1;
double TrailingStop2;
double TrailingStop3;
double TrailingStop4;
double StopLoss1;
double StopLoss2;
double PositionInfo;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
{
   Indikator=iCustom(_Symbol,1,"3d_oscilatorsign",13,8,8,0.4,4);  // Höchster Kaufs- und Verkaufspunkt
   RSI=iRSI(_Symbol,1,14,PRICE_CLOSE);
   
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   IndicatorRelease(Indikator);
   IndicatorRelease(RSI);
}
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
{  
   bid=SymbolInfoDouble(_Symbol,SYMBOL_BID);
   ask=SymbolInfoDouble(_Symbol,SYMBOL_ASK);
   
   PositionInfo=PositionGetDouble(POSITION_PRICE_OPEN);
   
   ArraySetAsSeries(Kaufen,true);
   ArraySetAsSeries(Verkaufen,true);
   
   if(CopyBuffer(Indikator,1,0,1,Kaufen)<0)
   {
      Print("CopyBufferRenko error =",GetLastError());
      ResetLastError();
      return;
   }
   if(CopyBuffer(Indikator,0,0,1,Verkaufen)<0)
   {
      Print("CopyBufferRenko error =",GetLastError());
      ResetLastError();
      return;
   }
   
   ArraySetAsSeries(Werte,true);
   
   if(CopyBuffer(RSI,0,0,10,Werte)<0)
   {
      Print("CopyBuffer error =",GetLastError());
      ResetLastError();
      return;
   }
   
   if(PositionSelect(_Symbol)==false)
   {
      if(Kaufen[0]>0 || Werte[0]<30)
      {
         m_Trade.Buy(0.01,_Symbol);
      }
      if(Verkaufen[0]>0 || Werte[0]>70)
      {
         m_Trade.Sell(0.01,_Symbol);
      }
   }
   
   if(PositionSelect(_Symbol)==true)
   {
      if(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY)
      {
         StopLoss1=PositionInfo-0.00025;
         if(bid>PositionInfo+0.00001)
         {
            TrailingStop3=PositionInfo+0.00001;
         }
//         if(bid>TrailingStop_Wert1)
//         {
//            TrailingStop_Wert1=bid;
//            TrailingStop1=TrailingStop_Wert1-StopLoss1;
//         }
         if(bid<=TrailingStop3 || bid<=StopLoss1)
         {
            m_Trade.PositionClose(_Symbol);
         }
      }
      
      if(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_SELL)
      {
         StopLoss2=PositionInfo+0.00025;
         if(ask<PositionInfo-0.00001)
         {
            TrailingStop4=PositionInfo-0.00001;
         }
//         if(ask<TrailingStop_Wert2)
//         {
//            TrailingStop_Wert2=ask;
//            TrailingStop2=TrailingStop_Wert2+StopLoss2;
//         }
         if(ask>=TrailingStop4 || ask>=StopLoss2)
         {
            m_Trade.PositionClose(_Symbol);
         }
      }
   }
}
//+------------------------------------------------------------------+

 2. Da es bald Zeit fürs traden wird, wollte ich fragen ob ihr mir einen sehr guten Broker für MT5 empfehlen könnt mit einer Mindesteinzahlung von 100€

3D_OscilatorSign
3D_OscilatorSign
  • Stimmen: 13
  • 2016.02.09
  • Nikolay Kositsin
  • www.mql5.com
Semaphore signal indicator based on the 3D_Oscilator indicator intersection algorithm.
 
hausmannjack: 2. Da es bald Zeit fürs traden wird, wollte ich fragen ob ihr mir einen sehr guten Broker für MT5 empfehlen könnt mit einer Mindesteinzahlung von 100€

ActiveTrades ist der Broker meiner Wahl. Faire Spreads, gutes Kundenservice, gute Datenversorgung, schnelle Ausführung, Demokonten mit realen Daten, usw...

Grund der Beschwerde: