This utility allows monitoring of multiple symbols and positions on one chart, with one group for long (buy) symbols, and another group for short (sell) symbols. There are 7 default symbol pairs in each of the groups. The user may change these and enter up to 50 symbols from their market watch in either of the long or short basket for viewing.
The current display chart can be changed to any of the symbols in the indicator display with a click on the symbol. Statistics including ATR, points gained or lost from a week’s start and position gains or losses and lots exposure are displayed. The statistics week may be changed with simple clicks on the display, and the display may be dragged and dropped to a different location.
The load on quote processing is kept low by simply posting an event that starts the processing for a display update instead of running the update inline with the quote processing. Also, the display will be updated at least every second even if there are no quotes received on the current chart.
Here are descriptions of the main controls and features of the display - The first two lines have the 'control objects (full picture below):
"Basket Viewer (wk 0): 2019.07.14 - 2019.07.21"
"BUY BASKET Points Term_ATR
"BUY BASKET Points Indi_ATR Pos_Prft Pos_lots"
Click this line to highlight the currently selected week on the chart (draws a rectangle over the week). Click a 2nd time to remove the rectangle.
As can be seen in the below display picture, this header is followed by the buy pairs statistics, including a total for the Points, ATR, Prft and Lots columns.
"SELL_BASLET Points Term_ATR
"SELL_BASLET Points Indi_ATR Pos_Prft Pos_Lots"
This is a repeat of the "BUY Basket" header for the "Sell Basket". Clicking this line changes how the ATR is calculated, either by getting the data from the terminal using the iATR handle, or by calculating itself using iHigh and iLow functions. As can by seen in the below display, this header is followed by the sell pairs statistics, including a total for the Points, ATR, Prft and Lots columns. The totals are opposite from the Buy Basket - for example, profit points are (open - current/close) price for the week, versus (current/close - open) for the Buy Basket.
Clicking on any of the "Symbol Pairs" changes the chart to that symbol pair.
There is considerable error messaging in the indicator to log when the terminal is not ready to provide quote information. I recommend obtaining and un-commenting "#include <errordescription.mqh> // errordescription.mqh is found at: https://www.mql5.com/en/code/79 ", and then searching for ErrorDescription and editing the lines with it to include the Error Description. These features were commented out to enable the code to pass the automated testing required for publishing - I'm not aware of another good way to get error descriptions.
The line (line 390) "USE_TERMINAL_ATR = ON;" can be edited to "USE_TERMINAL_ATR = OFF;" to default to calculating the ATR internally to the
indicator - I chose not to do so as the startup and initialization of terminal data for the indicator seemed to work better with the
value ON. The terminal seems to require some time to prepare the values for iOpen, iClose, iHigh and iLow. If running in the Strategy
Tester, be patient, the terminal may take some time to initialize before starting execution.
Indicator Bears and Bulls Power for MT5 together in one separate window.CamarillaFlatandClear
The code consists of lines created according to the opening, closing, low and high values of prices.
The utility will display the high, low, open, close and time statistics for any user selected bar of any timeframe for the symbol of the chart the utility resides on.dTrends
Arrow trends by iBearsPower and iBullsPower indicator for MT5