How I assemble my advisor by trial and error - page 52

 

All in search of points - added Rsi and Macd to this one (Indicator https://www.mql5.com/ru/code/392)

XAUUSDM30

BrainTrend1Sig
BrainTrend1Sig
  • www.mql5.com
Просмотров: 4377 Рейтинг: Опубликован: 2011.07.29 17:23 Обновлен: 2016.11.22 07:33 BrainTrend1Sig - это рыночный индикатор для открытия позиций и выхода из них. Он показывает точки смены тренда цветом, когда цена достигает экстремальных значений и наступает самое удобное время для входа или выхода из рынка. В основе индикатора заложены...
 

I made an Expert Advisor on mt4 out of nothing to do

for this type of Indicatorshttps://www.mql5.com/ru/code/8772

Photo by

Snapshot2 this is one of the modes

There is a usual mode - open close

BrainTrend1Sig
BrainTrend1Sig
  • www.mql5.com
Индикатор BrainTrend1Sig.
 
Alexsandr San:

I made an Expert Advisor on mt4 out of nothing to do

for this type of Indicatorshttps://www.mql5.com/ru/code/8772

This is one of modes

There is a usual mode - open close

This glitchy, Indicator for the testerhttps://www.mql5.com/ru/code/8772

The final result is

Snapshot0

Snapshot7

BrainTrend1Sig
BrainTrend1Sig
  • www.mql5.com
Индикатор BrainTrend1Sig.
 

hard in the MT4 tester, it's awful how testing goes from Indicatorshttps://www.mql5.com/ru/code/28364

Photo by

Phoenix
Phoenix
  • www.mql5.com
В стрелочном индикаторе Phoenix используется комбинация трех индикаторов: Moving Average, Bolinger Bands и Momentum в сочетании с двумя мощными формулами, основанными на поведении цены текущего графика. В индикаторе Phoenix также реализована система звуковых и текстовых алертов, а также отправка...
 
Alexsandr San:

Maybe someone is interested in playing with this function in the tester - I am pasting the utility, it is purely for the tester, you also need thisLow_Macd_Line.mq5 Indicator

the function itself Here-

when from the indicatorLow_Macd_Line.mq5 you need to give these horizontal lines, one name"LOW"

might be interesting

don't you show it anymore?

 
Renat Akhtyamov:

might be interesting.

You can't show me the state yet?

That version is purely in the tester, to see how the function works. There is no result, even if there is a result, it is not correct.

Here https://www.mql5.com/ru/signals/741568 I'm checking the Utility . I haven't activated this function yet, I'm checking the other functions.

 
Alexsandr San:

All in search of points - added Rsi and Macd to this one (Indicator https://www.mql5.com/ru/code/392)


missed a big mistake - did not change the name

corrected

//---- имя для окон данных и лэйба для субъокон
   string short_name="Rsi_Macd_BrainTrend1Sig";
   IndicatorSetString(INDICATOR_SHORTNAME,short_name);

Rsi_Macd_BrainTrend1Sig

 
Renat Akhtyamov:

might be interesting

do you not show the staat already?

this function can be used as SL or trawl (you set the distance and it trawls behind the blue line)

Photo by

it would be clearer to use it from the yellow line

//+------------------------------------------------------------------+
//| ENUM_TRADE_COMMAND                                                 |
//+------------------------------------------------------------------+
enum ENUM_TRADE_COMMAND
  {
   Turn_Off=0,       // TURN OFF
   Line1_Line1=1,    // Line: LOWER
   Line2_Line2=2,    // Line: TOP
   Line_Line=3,      // Line: LOWER+Line: TOP
   Line1_buys=4,     // Line: LOWER+Buy's
   Line2_sells=5,    // Line: TOP+Sell's
   sells_Line1=6,    // Line: LOWER+Sell's
   buys_Line2=7,     // Line: TOP+Buy's
   close_buys=8,     // Close All Buy's
   close_sells=9,    // Close All Sell's
   close_all=10,     // Close All Buy's and Sell's
   open_buy=11,      // Open Buy
   open_sell=12,     // Open Sell
   close_open_b=13,  // Close Sell+Open Buy
   close_open_s=14,  // Close Buy+Open Sell
   open_buy_sell=15, // Open Buy and Sell
  };
//+------------------------------------------------------------------+
 

here https://www.mql5.com/ru/forum/135593/page4#comment_3441020

Files:

But there is a DLL there - I deleted it. But the Indicator (MT4) is working, I still need to figure out what it can do

XAUUSDM30

Новый WmiFor (2.4)
Новый WmiFor (2.4)
  • 2012.02.23
  • www.mql5.com
Наблюдаю больше суток на разных парах. Вот только что еще один сигнал. Редкие, но удивительно точные предсказания (извините за эмоции =...
Files:
WmiFor.mq4  23 kb
 

before that, posted a function, profit loss in currency - closes positions. and a little wrong, it turned out to be just an equal should have been added

//+------------------------------------------------------------------+
//|                                                SIGNAL_PROFIT.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
//---
#include <Trade\PositionInfo.mqh>
#include <Trade\Trade.mqh>
#include <Trade\SymbolInfo.mqh>
CPositionInfo  m_position;                   // trade position object
CTrade         m_trade;                      // trading object
CSymbolInfo    m_symbol;                     // symbol info object
//---
input double TargetTakeProfit = 10000; // Прибыль
input double TargetStopLoss   = 10000; // Убыток
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   if(AccountInfoDouble(ACCOUNT_PROFIT)<-TargetStopLoss ||
      AccountInfoDouble(ACCOUNT_PROFIT)>=TargetTakeProfit)
     {
      CloseAll();
      PlaySound("ok.wav");
     }
  }
//+------------------------------------------------------------------+
//| start function                                                   |
//+------------------------------------------------------------------+
void CloseAll(void)
  {
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
        {
         ClosePosition(m_position.Symbol()); // close a position by the specified symbo
        }
  }
//+------------------------------------------------------------------+
//| Close selected position                                          |
//+------------------------------------------------------------------+
void ClosePosition(const string symbol)
  {
   if(InitTrade(symbol))
      m_trade.PositionClose(m_position.Ticket()); // close a position by the specified symbo
   PlaySound("ok.wav");
  }
//+------------------------------------------------------------------+
//| Init trade object                                                |
//+------------------------------------------------------------------+
bool InitTrade(const string symbol)
  {
   if(!m_symbol.Name(symbol)) // sets symbol name
      return(false);
   if(IsFillingTypeAllowed(symbol,SYMBOL_FILLING_FOK))
      m_trade.SetTypeFilling(ORDER_FILLING_FOK);
   else
      if(IsFillingTypeAllowed(symbol,SYMBOL_FILLING_IOC))
         m_trade.SetTypeFilling(ORDER_FILLING_IOC);
      else
         m_trade.SetTypeFilling(ORDER_FILLING_RETURN);
   return(true);
//---
  }
//+------------------------------------------------------------------+
//| Checks if the specified filling mode is allowed                  |
//+------------------------------------------------------------------+
bool IsFillingTypeAllowed(string symbol,int fill_type)
  {
//--- Obtain the value of the property that describes allowed filling modes
   int filling=(int)SymbolInfoInteger(symbol,SYMBOL_FILLING_MODE);
//--- Return true, if mode fill_type is allowed
   return((filling & fill_type)==fill_type);
  }
//+------------------------------------------------------------------+
Files:
Reason: