Coding help - page 443

 
Jeeves:
Hi Mladen, I have yet another request....! For the next two months my wife and I are to play host to four grandchildren. Which means my trading will without doubt suffer! I will restrict it to the FTSE100, & EOD trading. I have attached an expert which I'm hoping will give me time with the grandchildren, & also do the trading for me. The problem is....when I compile it, I get 14 warnings. Would you be kind enough to work your magic on it for me?

Jeeves

Here you go : manualordermanager_v8_nmc.mq4

Enjoy the time with the grandchildren

 
mladen:
Jeeves

Here you go : manualordermanager_v8_nmc.mq4

Enjoy the time with the grandchildren

Hi guy. I really do not know how you do it, but without you there would be a lot of very sad people about....me included. Many, many thanks, & you too enjoy whats left of the week-end. Take care

 

unfortunately there is nothing that I could be of interest, thank you anyway

 

unfortunately there is nothing that I could be of interest, thank you anyway

 
mladen:
Hifrom Check this thread for some discussion on that subject : https://www.mql5.com/en/forum/184556

unfortunately there is nothing that I could be of interest, thank you anyway

 

Hi,

I am trying to draw from my expert advisor an object in another chart underlying e.g. from my EURUSD chart in the CADCHF-chart.

I tried it with the following code:

int win_handle=WindowHandle("CADCHF",PERIOD_H1);

Print("Win Handle ", win_handle);

if (!ObjectCreate(name, OBJ_ARROW, win_handle, TimeCurrent(),MarketInfo("CADCHF",MODE_BID));

{

Alert("Error creating object: ",GetLastError());

return(0);

}

And I also tried this:

if(!ObjectCreate(win_handle,"TEST",OBJ_LABEL,0,0,0))

{

Print("Error: can't create label! code #",GetLastError());

}

 
sunshineh:
Hi,

I am trying to draw from my expert advisor an object in another chart underlying e.g. from my EURUSD chart in the CADCHF-chart.

I tried it with the following code:

int win_handle=WindowHandle("CADCHF",PERIOD_H1);

Print("Win Handle ", win_handle);

if (!ObjectCreate(name, OBJ_ARROW, win_handle, TimeCurrent(),MarketInfo("CADCHF",MODE_BID));

{

Alert("Error creating object: ",GetLastError());

return(0);

}

And I also tried this:

if(!ObjectCreate(win_handle,"TEST",OBJ_LABEL,0,0,0))

{

Print("Error: can't create label! code #",GetLastError());

}

'

Try like this :

long current = ChartFirst();

while (true)

{

if (ChartSymbol(current)=="CADCHF" && ChartPeriod(current)==PERIOD_H1) break;

current = ChartNext(current); if (current==-1) break;

}

if (current!=-1)

if (!ObjectCreate(current,name, OBJ_ARROW, 0, TimeCurrent(),MarketInfo("CADCHF",MODE_BID)))

{

Alert("Error creating object: ",GetLastError());

return;

}

[/PHP]

Or if you want to draw that object on each and every CADCHF H1 chart, do it like this :

[PHP]long current = ChartFirst();

while (true)

{

if (ChartSymbol(current)=="CADCHF" && ChartPeriod(current)==PERIOD_H1)

{

if (!ObjectCreate(current,name, OBJ_ARROW, 0, TimeCurrent(),MarketInfo("CADCHF",MODE_BID)))

{

Alert("Error creating object: ",GetLastError());

break;

}

}

current = ChartNext(current); if (current==-1) break;

}

 

Hi Mladen,

I'm having a problem with a modification i made in the coding for the mtf high low indicator. i made it too display short line at the different levels, however now it displays more level than it should for previous monthly, weekly, and daily high low. I don't know how to fix it. Could you help me please

Thanks

Files:
 
jizzle15:
Hi Mladen,

I'm having a problem with a modification i made in the coding for the mtf high low indicator. i made it too display short line at the different levels, however now it displays more level than it should for previous monthly, weekly, and daily high low. I don't know how to fix it. Could you help me please

Thanks

Would you mind showing an example how it shows more levels?

 
mladen:
Would you mind showing an example how it shows more levels?

Yes this is how it looks. (the red line are supposed to display the previous daily weekly and monthly high and low) but as you can see there is a huge number of lines..if i click on each of them there is a label that display ex:Previous dailyHigh[8] and another would be Previous dailyHigh[7]

Thanks for your help Mladen