거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
3061
평가:
(12)
게시됨:
2018.07.13 16:08
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

An Expert Advisor for closing all positions, in case of the total profits on those positions exceeded the Take Profit level fixed in inputs or the total losses on those positions exceeded the Stop Loss level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings. In a manner, this EA works as a global take profit function and a global stop loss function for all open positions simultaneously. The fact itself of stopping the losses and commanding to close positions is placed by the EA in a log file as relevant comments.

//+----------------------------------------------+
//|  Options to calculate the losses             |
//+----------------------------------------------+
enum StopMode
  {
   ENUM_PERCENT,     //losses and profits in percents
   ENUM_CARRENCY     //losses and profits in the deposit currency units
  };
//+----------------------------------------------+
//| Input parameters of the EA indicator         |
//+----------------------------------------------+
input StopMode LMode=ENUM_PERCENT;  //method of detecting losses and profits
input double StopLoss=20.0;         //stop loss level
input double TakeProfit=100.0;         //take profit level

The EA provides an option of closing positions only beyond the time interval defined in its input variables:

input bool TimeTrade=true; //Permission to trade by time intervals
input HOURS StartH=ENUM_HOUR_0; //Trading start (Hours)
input MINUTS StartM=ENUM_MINUT_0; //Trading start (Minutes)
input HOURS EndH=ENUM_HOUR_23; //Trading end (Hours)
input MINUTS EndM=ENUM_MINUT_59; //Trading end (Minutes)

Two variables (hours and minutes) are provided for the operation start time, and two similar variables for the end time.

Default settings enable the Expert Advisor to trade the whole trading session from 0:00, while all positions are closed at 23:59.

If the start time is later than the specified end time, the Expert Advisor will close positions the next day, at the specified time

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/21343

Exp_GTakeProfit_Tm Exp_GTakeProfit_Tm

An Expert Advisor for closing all positions, in case of the total profits on those positions exceeded the Take Profit level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings.

Exp_GStopLoss_Tm Exp_GStopLoss_Tm

An Expert Advisor for closing all positions, in case of the total losses on those positions exceeded the Stop Loss level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings.

AOCCI AOCCI

An Expert Adviswor based on two indicators: iCCI (Commodity Channel Index, CCI) and iAO (Awesome Oscillator, AO)

Ozymandias_System Ozymandias_System

An indicator that colors candlesticks going beyond channel Ozymandias.