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

Missing Stop Loss and Take Profit Setter - MetaTrader 5용 expert

Kenichiro Sakamoto
Kenichiro Sakamoto
5 (2)
저는 Kenichiro Sakamoto이며, MetaTrader 5용 투명하고 규칙 기반의 EA(Expert Advisor)를 만드는 스튜디오 FXEA365의 개발자입니다.
조회수:
58
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

This Expert Advisor checks the open positions on every tick and every 5 seconds. When a position has no stop loss, a stop loss is placed at the set number of pips from the open price, and when it has no take profit, a take profit is placed in the same way. Stop levels that already exist are never changed.

The check can be limited to the chart symbol or applied to all symbols, and a magic number filter can limit it to manual trades or to the trades of one Expert Advisor. The chart comment shows the settings, the number of positions in scope, the positions still without stops and the number of positions changed since the start.

Fig. 1. The utility on a EURUSD H1 chart

Input parameters

  • InpSLPips - stop loss distance from the open price in pips; 0 means that no stop loss is added.
  • InpTPPips - take profit distance from the open price in pips; 0 means that no take profit is added.
  • InpAllSymbols - check the positions of all symbols; when false only the chart symbol is checked.
  • InpMagic - magic number filter: -1 checks all positions, 0 only manual trades, another value only the trades with that magic number.

Notes

If the price has already moved past the calculated level, or the level is closer to the price than the stop level of the broker, that level is skipped and the position is checked again later. One pip is 10 points on 3 and 5 digit quotes and 1 point on other symbols. Failed requests are written to the Experts log with the description of the trade server return code.

Spread Spike Histogram with Moving Average Spread Spike Histogram with Moving Average

Separate window indicator that draws the spread of every bar as a histogram with its moving average and colors the bars where the spread is far above normal or above a fixed ceiling.

Economic News Window Flag for Pausing Expert Advisors Economic News Window Flag for Pausing Expert Advisors

Utility Expert Advisor that reads the built-in economic calendar and sets a terminal global variable to 1 around important events, so other Expert Advisors can skip new entries during the news.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.