Download MetaTrader 5

DayOfWeek-Names vertically at the top - page 3

To add comments, please log in or register
BurkhardWille
175
BurkhardWille  

Hi deVries,

looks great!

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

Tjipke de Vries
6398
Tjipke de Vries  
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
175
BurkhardWille  
Ok, thanks, I am waiting for the Codebase-article.
SYED NAUFAL GADDAFI
1399
SYED NAUFAL GADDAFI  
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
175
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.

Tjipke de Vries
6398
Tjipke de Vries  
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