← К каталогу
Исходный код · ID 2660

news_stopper - forexfactory.mq4

Вы автор или правообладатель?

Сообщите нам, если считаете, что материал размещён без разрешения.

Получить полный код

Поиск по коду файла

#property version   "1.00"
#property strict
#property description "This is a free tool. visit our telegram chanel for more. \n(please allow DLL import and add  to allowed URLs for ea to work)"

#include <WinUser32.mqh>
#import "user32.dll"

int GetAncestor(int, int);
#define MT4_WMCMD_EXPERTS  33020 
#import

enum currencies
  {
   type1,//Chart Symbol (Auto)
   type2,//Custom Symbols
  };

input string                  info1 = " ------======<<[  News Management  ]>>======------ "; //---=== News Settings ===---
input string                  news_link = "";// --- News URL (to be placed in settings)

input int                     min_before = 5;         //Minutes Before News to close
input int                     min_before_zero = 60;   //Minutes Before News to close with zero profit
input int                     min_after = 45;         //Minutes After News to halt

input bool                    include_high = true;       // Include high
input bool                    include_medium = false;    // Include medium
input bool                    include_low = false;       // Include low

input bool                    use_title  = true;   // Filter News based on title
input string                  title_phrase="Non-Farm,Unemployment,ISM,PMI,CPI,FOMC,Retail Sales,Final GDP q/q,Core PCE Price Index m/m,Empire State Manufacturing Index,Advance GDP q/q,JOLTS";//title keyword (comma seperated)

input int                     news_update_hour = 2;//Update time interval (in hours) 

input currencies              symbol_type = type1;                         //Currencies check method
input string                  news_symbols = "USD,EUR,GBP,JPY,CAD,CHF";    // Custom Currencies to Check For News
input bool                    close_only_news_pair  = false;                // Only Close Orders of The Events Currency

input bool                    draw_news_lines = true;                      //Draw News Lines on chart
input color                   Line_Color =clrRed;                          //Lines Color
input ENUM_LINE_STYLE         Line_Style =STYLE_DOT;                       //Lines Style
input int                     Line_Width =1;                               //Line Width

input string                  info2 = " ------======<<[  Order Management  ]>>======------ "; //---=== Order Management ===---
input bool                    stop_algo = true;       //Stop Auto trading 
input bool                    close_open = true;      //Close all open trades 
input bool                    close_pending = true;   //Delete all Pending orders 
input bool                    close_zero = true;      //Close all trades with profit 
input double                  close_profit = 1;       //Profit for Closing all trades (in $)
input bool                    close_charts = false;   //Close all Charts 

input string                  info3 = " ------======<<[  Settings  ]>>======------ "; //---=== Settings ===---
input bool                    send_notif = true;   //Send notification 
input bool                    send_alert = true;   //Send Alert
input int                     delay = 5;           //Delay if somthing goes wrong (in seconds)

int slippage = 5;//Slippage
int event_count=0,time_offset=0;
bool allow_trade =true;
string pairs[],sybmols_list;

struct news_event_struct{
   string currency;
   string event_title;
   datetime event_time;
   string event_impact;
} news_events[500];

int OnInit()
  {
      // код доступен только после оплаты
   }

void OnDeinit(const int reason)
  {

   Comment("");
   ObjectsDeleteAll(0);
   if(reason==1) EventKillTimer();
  }

void OnTick()
  {
      // код доступен только после оплаты
   }

void OnTimer()
  {

   NewsUpdate();
   DrawNews();

  }

void NewsUpdate(){
   string cookie=NULL,referer=NULL,headers;
   char post[],result[];
   string sUrl="";
   ResetLastError();
   int res = WebRequest("GET",sUrl,cookie,referer,5000,post,s

Показано первые 50% кода (символов: 11684)

Что вы получите после оплаты

На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.

Чтобы оформить заказ, введите email и перейдите к оплате.

Стоимость полного кода
1 168₽