0
только что проверил вариант, который залил в базу: www.opentraders.ru/downloads/2330/

сигналит при установке и молчит при смене тф. почему не работает у вас не могу знать. возможно при установке на график у вас в терминале есть какие то другие глобал вариэйбэлс.
avatar

AM2

  • 25 июня 2019, 21:18
0
да я уж подожду своё чудо))


чудо :D 



www.opentraders.ru/downloads/2331/
avatar

AM2

  • 25 июня 2019, 20:45
0
почему ваш пример не работает?

нужно больше конкретики а не просто работает не работает. вы дали 2 варианта тз, я скинул 2 наброска и т.д. что не работает, какой именно вариант, по какому тз и т.д.?
avatar

AM2

  • 25 июня 2019, 17:29
0
чтобы после того как кинул индикатор на график прозвучала музыка 1 раз

это тоже слова автора я так и сделал :) 
avatar

AM2

  • 24 июня 2019, 21:34
0
не до конца проработанное тз, но за последний год показывает результат:



www.opentraders.ru/downloads/2329/
avatar

AM2

  • 24 июня 2019, 20:39
0
Спасибо но не работает(((( в чем может быть проблема?

опишите подробнее что не работает. когда делал второй вариант все проверял.
avatar

AM2

  • 24 июня 2019, 19:22
0
прошу вас сделать приветствие в виде индикатора
т.е чтобы после того как кинул индикатор на график прозвучала музыка 1 раз


готово:


//+------------------------------------------------------------------+
//|                                                       Privet.mq4 |
//|                                              Copyright 2019, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, AM2"
#property link      "http://www.forexsystems.biz"
#property version   "1.00"
#property strict
#property indicator_chart_window

input string mus="news.wav";
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   if(GlobalVariablesTotal()<1) PlaySound(mus);
   GlobalVariableSet("val",1);   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   if(reason==1) GlobalVariablesDeleteAll();
   Comment("\n Total: ",GlobalVariablesTotal());
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   Comment("\n Total: ",GlobalVariablesTotal());
   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+

avatar

AM2

  • 23 июня 2019, 21:18
0
сделал пример с глобальными переменными терминала. не работает.


//+------------------------------------------------------------------+
//|                                                       Privet.mq4 |
//|                                              Copyright 2019, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, AM2"
#property link      "http://www.forexsystems.biz"
#property version   "1.00"
#property strict
#property indicator_chart_window

input string mus="news.wav";
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   if(GlobalVariablesTotal()<1) PlaySound(mus);
   GlobalVariableSet("val",1);   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   GlobalVariablesDeleteAll();
   Comment("\n Total: ",GlobalVariablesTotal());
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   Comment("\n Total: ",GlobalVariablesTotal());
   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+



чуть позже попробую вариант с графическим объектом на графике
avatar

AM2

  • 23 июня 2019, 16:39
0
не берусь
avatar

AM2

  • 23 июня 2019, 16:04
0
у вас есть один заказ за этот месяц
avatar

AM2

  • 23 июня 2019, 16:00
0
//+------------------------------------------------------------------+
//|                                                  OrderProfit.mq4 |
//|                                              Copyright 2019, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, AM2"
#property link      "http://www.forexsystems.biz"
#property version   "1.00"
#property strict

input int One=1;
input int End=1;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

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

  }
//+------------------------------------------------------------------+
//| Профит всех ордеров по типу ордера                               |
//+------------------------------------------------------------------+
double AllProfit(int one=0,int end=3)
  {
   double pr=0;
   for(int i=one;i<end;i++)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderSymbol()==Symbol() && OrderType()<2) pr+=OrderProfit()+OrderCommission()+OrderSwap();
        }
     }
   return(pr);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void PutOrder(int type,double price)
  {
   int r=0;
   color clr=Green;

   if(type==1 || type==3 || type==5)
     {
      clr=Red;
     }

   if(type==0 || type==2 || type==4)
     {
      clr=Blue;
     }

   r=OrderSend(NULL,type,0.1,NormalizeDouble(price,Digits),0,0,0,"",0,0,clr);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   if(OrdersTotal()<1)
     {
      for(int i=1;i<=5;i++) PutOrder(2,Bid-111*Point*i);//buylimit
      for(int i=1;i<=5;i++) PutOrder(3,Bid+111*Point*i);//selllimit
     }
   Comment("\n Profit: ",AllProfit(One,End));
  }
//+------------------------------------------------------------------+
avatar

AM2

  • 22 июня 2019, 16:27
0
по окончании отпуска посмотрю заказы и от новичков с поручителем
avatar

AM2

  • 19 июня 2019, 21:09