Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Views:
5370
Rating:
(18)
Published:
2011.06.14 12:41
Updated:
2016.11.22 07:32
\MQL5\Indicators\
subwindow.mq5 (2.1 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Do you want to place a Chart objects (OBJ_CHART) on the chart and use it as conventional chart? It's possible.

The only thing you need is the handle of OBJ_CHART object. Using the Chart Operations you may add and delete indicators (ChartIndicatorAdd() and ChartIndicatorDelete()), set chart Period, Symbol etc.

EA_OBJPROP_CHART_ID

The EA_OBJPROP_CHART_ID Expert Advisor, does the following actions:

  • Adds a PriceChannel indicator, included in the standard package of the client terminal (located in terminal_data_folder\MQL5\Indicators\Examples);
  • Creates a subwindow using Subwindow indicator (copy Subwindow.mq5 to terminal_data_folder\MQL5\Indicators);
  • Creates an object (in the subwindow) of OBJ_CHART type with chart symbol, but D1 and H4 timeframes;
  • For each object of OBJ_CHART type it adds a Price_Channel indicator with default parameters and changes background color.

When delete from the chart, it deletes all the indicators created:

//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//--- delete objects
//  ObjectDelete(0,D1);
//  ObjectDelete(0,H4);
//--- delete subwindow
   ChartIndicatorDelete(0,subwindow_ID,"Subwindow");
//--- delete PriceChannel indicator from the main window
//--- its short name with default parameters is "Price Channel(22)"
   ChartIndicatorDelete(0,0,"Price Channel(22)");
  } 

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/359

The class of a module of trade signals, on "inner bar breakthrough" in trend direction The class of a module of trade signals, on "inner bar breakthrough" in trend direction

The strategy is following: when outer (outside) bar appears, it checks the fact of the inner bar breakthrough in trend direction and generates a signal to open position. A module of trade signals is compatible with the new version of MQL5 Wizard.

STALIN STALIN

The Buy/Sell signals of the indicator are based on crossover of two moving averages with different periods.

Blau_Mtm Blau_Mtm

Momentum Indicator by William Blau.

Blau_TSI Blau_TSI

True Strength Index (TSI) indicator by William Blau.