거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Twitter에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
Experts

Trailing_Profit - MetaTrader 5용 expert

게시자:
Vladimir Karputov
조회수:
11721
평가:
(39)
게시됨:
2017.08.10 12:56
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Author of the idea — Vitaly, author of the MQL5 code — barabashkakvn.

The Expert Advisor manages all open positions in the terminal (on all symbols and with all magic numbers). If the total profit has not reached "minimum_profit", the EA waits.

If the total profit has reached "minimum_profit", the EA sets a percent of profit drawdown and enables tracking.

The "percent_of_profit" parameter is specified in percent. For example, "minimum_profit" = 1000 and "percent_of_profit" 20. The total profit of all open positions has reached 1000. If the profit falls to 800 (1000 - 20%), positions will be closed. If the profit continues to grow, for example up to 2000, the allowable drawdown will be equal to 400 (2000 - 20%). That is, all positions will be closed with the total profit of 1600. There is no fixed drawdown limit, as I do not find it useful to use absolute values.

In theory, it is possible to set percentage = 0. It will function as a total Take Profit. It is possible to set percentage = 100, it will function as breakeven (do not forget, as some orders are being closed, others may become losing).

Attention! The Expert Advisor works with the 3-second interval:

void OnTick()
  {
//--- allow work every three seconds
   static datetime prev_time=0;
   datetime time_current=TimeCurrent();
   if(time_current-prev_time<3)
      return;
   prev_time=time_current;
//---


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

EURUSD breakout EURUSD breakout

The EA trades during two trading sessions, starting at the specified session beginning time. Stop Loss. Take Profit.

ExpertClor_v01 ExpertClor_v01

An assistant Expert Advisor. Only CLOSING positions.

Get_Rich_or_Die_Trying_GBP Get_Rich_or_Die_Trying_GBP

Trades on PERIOD_M1 (M1). Calculates bullish and bearish candlesticks.

HistoryPositionInfo version 2 HistoryPositionInfo version 2

Returns the profit of a position in points, as well as commission, swaps and profit in money based on the trading history.