Download MetaTrader 5

DayOfWeek-Names vertically at the top - page 3

To add comments, please log in or register
Do you want to order an application? Find out how to obtain the desired result
BurkhardWille
170
BurkhardWille 2014.04.18 18:47  

Hi deVries,

looks great!

How do you solve the problem with code? Is there an article at Codebase?

Tjipke de Vries
6315
Tjipke de Vries 2014.04.18 22:14  
qjol:
you have to write the code in a proper way to change the objects position in case you zoom in / out


if the price change more then a point then move the objects of the indicator

version for mq5 is ready for proofreading in codebase mql5

version of mq4 it can be a bug in

void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
//---
//--- find the highest and lowest values of the chart
   max_price=ChartGetDouble(0,CHART_PRICE_MAX);
   min_price=ChartGetDouble(0,CHART_PRICE_MIN);

   if(id==CHARTEVENT_CHART_CHANGE)

but if i place this logic in int OnCalculate( ......

it works there also ....

if you tried then show your attempt for getting help making it so we can guide you places where you go wrong

BurkhardWille
170
BurkhardWille 2014.04.22 19:52  
Ok, thanks, I am waiting for the Codebase-article.
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.23 02:05  
BurkhardWille:
Ok, thanks, I am waiting for the Codebase-article.

Actually, we want to see your coding attempt first. Post here. Use SRC for codes.
BurkhardWille
170
BurkhardWille 2014.04.23 21:09  

I try a lot, but the queries are too often, it is requested each tick for drawing the objects.

Would be the best if the creation of all past (day names) objects are in the OnInit-block and the creation of new day names take place only in the very first tick of a first new day bar, like TimeDayOfWeek(Time[0]) != TimeDayOfWeek(Time[1]) to avoid unnecessary queries.

Tjipke de Vries
6315
Tjipke de Vries 2014.04.23 21:48  
BurkhardWille:

I try a lot, but the queries are too often, it is requested each tick for drawing the objects.

Would be the best if the creation of all past (day names) objects are in the OnInit-block and the creation of new day names take place only in the very first tick of a first new day bar, like TimeDayOfWeek(Time[0]) != TimeDayOfWeek(Time[1]) to avoid unnecessary queries.


NewTradingDay 2013.04.19

a name and a date of the object

123
To add comments, please log in or register