Assista a como baixar robôs de negociação gratuitos

Roteiro interessante?
Então poste um link sobre isto -
deixe que outros avaliem

Você gostou do roteiro? Experimente no terminal MetaTrader 5

Bibliotecas

Symbol Trade Made Simple - biblioteca para MetaTrader 5

Thiago Duarte

Visualizações:
1726
Classificação:
votos: 9
Publicado:
2019.06.21 15:34
Atualizado:
2019.10.10 06:03
\MQL5\Include\Trade\\MQL5\Include\\MQL5\Indicators\

This library shows useful informations and do some functions to a symbol.

Version 1.9, updated 09/Oct/2019.

Functions:

  • SYMBOL:
  • SymbolOpenPositionsTotal(str symbol) - return the number of opened positions.
  • SymbolOpenPositionsVolume(str symbol) - return the total volume of opened positions.
  • SymbolPendingOrdersTotal(str symbol) - return the number of pending orders.
  • SymbolPendingOrdersVolume(str symbol) - return the total volume of pending orders.
  • SymbolPendingOrdersSpecific(str symbol, str comment) - return the number of specific open positions by comment.
  • SymbolOpenResult(str symbol) - return the result (profit) from all open positions together.
  • SymbolOpenPips(str symbol) - return the pips from all open positions.
  • SymbolOpenPositionsClose(str symbol) - close all open positions.
  • SymbolOpenPositionsClosePartial(str symbol, double volume) - close partial all open positions.
  • SymbolOpenPositionsBreakeven(str symbol, double ticket, bool CalculateSpread) - breakeven specific position.
  • SymbolOpenPositionsBreakevenAll(str symbol, bool CalculateSpread) - breakeven all open positions.
  • SymbolPendingOrdersCloseAll(str symbol) - close all pending orders.
  • SymbolPendingOrdersCloseSell(str symbol) - close all pending sell orders.
  • SymbolPendingOrdersCloseBuy(str symbol) - close all pending buy orders.
  • SymbolRiskReward(str symbol, int ticket bool, position) - return the risk/reward ration from specific open position (position = true) or pending order (position = false).  Stop loss and take profit must be specified.
  • SymbolPositionReverse(str symbol, bool copy sl and tp, int ticket) - reverse specific position.
  • SymbolPositionReverseAll(str symbol, bool copy sl and tp) - reverse all open positions.
  • CandleTime(str separator, bool show seconds) - return the candle remaining time in string mode.
  • SymbolNormalizeVolume(str symbol, double volume, bool ShowErrorMsg) - return the normalized (corrected) the inputed volume.
  • SymbolNormalizeDigits(str symbol) - normalize digits to divide on some functions.
  • SymbolChartClean(str symbol, show date, show price, show oneclicktrade) - clean all chart, including date and price (optional).
  • SymbolTimeframe(default  daily, weekly and monthly timeframes in english or specify each one) - return the timeframe in string (ex. M1, M12, H3, Weekly, ect).
  • SymbolPositionsSwapTotal(str symbol) - return in double the total swap from all open positions.
  • SymbolPositionsCommissionTotal(str symbol) - return in double the total commission from all open positions .
  • SymbolPriceChange(double price1, double price2) - return the percentage difference from two prices.
  • SymbolNormalizePrice(str symbol, double price) - normalize price by tick size.
  • SymbolPositionResultMoney(str symbol, double volume, double OpenPrice, double TargetPrice, bool invert) - return the result from a position specified price target in money.   NEWHOT!
  • SymbolPositionResultPercentage(str symbol, double volume, double OpenPrice, double TargetPrice, bool invert) - return the result from a position specified price target in percentage.  NEW. HOT!
  • SymbolPeriodChangePips(str symbol, period) - return the change in pips between the actual price and previous candle close. On daily period, for example, you can view the daily pips change. NEW. HOT!
  • SymbolPeriodChangePercentage(str symbol, period) - return the change in percentage between the actual price and previous candle close. On daily period, for example, you can view the daily percentage change. NEW. HOT!
  • OTHERS:
  • FixDatetimeDays(datetime, int days to fix, bool subtract or add) - subtract or add days to specific date or time and return it in datetime.
  • FixDatetimeHours(datetime, int hours to fix, bool subtract or add) - subtract or add hours to specific date or time and return it in datetime.
  • FixDatetimeMinutes(datetime, int minutes to fix, bool subtract or add) - subtract or add minutes to specific date or timed return it in datetime.
  • FixDatetimeSeconds(datetime, int seconds to fix, bool subtract or add) - subtract or add seconds to specific date or time and return it in datetime.
  • RoundValue(double valuetoround, int round) - return a integer rounded number.
  • NewCandleCheck(str symbol) - boolean return when new candle are formed.
  • ChartHideObjects(long chart, objecttype) - hide all objects from chart.
  • ChartShowHiddenObjects(long chart) - show all hidden objects from chart.
  • IsFirstTime(str filename) - return boolean if is first time running the application.
  • GetDeinitReason(int reasoncode) - return in string the reason to program deinitialization.
  • StringRemoveEmptySpace(str string) - return in string type the original string without empty spaces.  NEW.
  • CheckIfIsNumber(double ValueToCheck) - return true if a variable is number or false if it is not number. Good for text boxes.   NEW.
  • ACCOUNT:
  • AccountMode() - return the account mode in string (netting, exchange or hedging).
  • AccountType() - return the account type in string (demo, competition or real).
  • AccountDate(bool show day, bool show month, bool show year, str separator) - return in string modethe actual time in day, month and year.
  • AccountMonthOfYear(default months or specify each one) - return in string mode the actual month of year.
  • AccountDayOfWeek(default days or specify each one) - return in string mode the actual week day.
  • AccountDayOfWeekInt(default days or specify each one) - return in integer mode the day of week.
  • AccountHourInteger() - return in integer mode the current hour.
  • AccountOpenResult() - return in double mode the result from all open positions.
  • AccountOpenPercentage() - return in double mode the result in percentage from all open positions.
  • AccountCheckConnections(bool CheckServer, bool CheckTradingEnabled, bool CheckMQL5, str ServerErrorMsg, str TradingErrorMsg, str MQL5ErrorMsg, str MsgCaption) - show a error message when specific connections is not working. NEW.
  • AccountConnectionState - return in string type the connection state (on-line or off-line).  NEW.
  • AccountPositionsClose(str ErrorPrint) - close all open positions from all symbols. NEW.

Added:

  • Check if a number variable is string (letters).
  • Symbol position result in $ (HOT!).
  • Symbol position result in % (HOT!).
  • Remove empty space from string.
  • Account check connection (warnings).
  • Account connection state (on-line or off-line).
  • Account positions close (bool).
  • Symbol period change in percentage (HOT!).
  • Symbol period change in pips (HOT!).

Changes:

  • Removed Trade library. Only TradeAlt used.

    Very simple, no need to explain more :)

      Laguerre RSI - no gamma Laguerre RSI - no gamma

      Laguerre RSI - sem usar o parâmetro gama

      Quatro cliques para desenhar um canal em forma de arco. Quatro cliques para desenhar um canal em forma de arco.

      Uma maneira rápida de desenhar um canal em forma de arco com 4 cliques do mouse.

      Volume Normalize (correct it) Volume Normalize (correct it)

      Normalize (correct) the volume (lot) according to the symbol lot step

      Accelerator Oscillator (AC) Accelerator Oscillator (AC)

      O Indicador Acceleration/Deceleration (Aceleração/Desaceleração ou AC) mede a aceleração e a desaceleração da força motriz atual do mercado.