[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 184

 
ScioMe:

Folks, I can't figure out why OrderModify() doesn't draw sticks when it modifies an order:

It's supposed to show green, but it doesn't. I don't know what to think, can't this function show on the chart?


After the TP it should be the order lifetime, not the colour. Put 0 and you will get sticks.
 
eddy:
I think the arrow is drawn on the bar with the opening time of the order, do you check it?

Yes, it is drawn. But it is not OrderModify-ya, but a stop loss placed at the opening of a market order. And it does not show further.
 
todem:

I meant the first line - you posted "without the assignment sign".

Indeed, I apologise for the inaccuracy, copying error.
 
Roger:

After the TP, it should be the lifetime of the order, not the colour. Put 0 and you will have sticks.

I have tried it, it does not want to draw! According to the log 4 modifications of the order, and on the chart draws green only before the order is closed.
 

Good day! I've made a very simple indicator, very simple, I think all according to the functions listed in the dictionary, and as they write in textbooks, everything seems simple, but it does not draw at all!

I thought, I do not know, maybe I did not teach him something so basic?

//+------------------------------------------------------------------+
//| Cross.mq4 |
//| Copyright © 2011, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
#property indicator_width1 2
double Buffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialisation function |
//+------------------------------------------------------------------+
int init()
{SetIndexBuffer(0,Buffer1);
SetIndexStyle(0,DRAW_LINE);
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialisation function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
for(int i=0;i<300 ; i++){
Alert("Close[i]",Close[i]);Alert("iClose(GBPUSD, Period(), i)",iClose("GBPUSD", Period(), i));
Alert("counted_bars",counted_bars;)

Buffer1[i]=Close[i]/iClose("GBPUSD", Period(), i);Sleep(1000);}

//----
return(0);
}
//+------------------------------------------------------------------+

I will try to put a period here iClose("GBPUSD", Period(), i);Sleep(1000);

As logical, it is equal to the period of the underlying chart, but on a different pair. But most importantly, it does not draw at all! Help, please!

 
ScioMe:

Yes, it is drawn. But it's not OrderModify, it's a stop loss set when a market order is opened.
bool OrderModify(..., color arrow_color=CLR_NONE)
arrow_color - Colour of StopLoss and/or TakeProfit modification arrows on the chart.
 
Dimka-novitsek:

Good day! I've made a very simple indicator, very simple, I think all according to the functions listed in the dictionary, and as they write in textbooks, everything seems simple, but it does not draw at all!

I thought, I do not know, maybe I did not teach him something so basic?

I will try to put a period here iClose("GBPUSD", Period(), i);Sleep(1000);

It logically equals the period of the base chart, but on another pair. I don't know what else it does, but the main thing is that it won't do it at all. Please help me.

1. You have sleep in the loop. It means that after calculation of each point of 300 it must pause.

2. You are drawing the line between the opening price of the current chart and "GBPUSD" chart on the current graph. That is, if you do this on "GBPUSD" you will show a line at 1

 
Hello, could you tell me if it is possible for mql to connect to different servers under different logins and save html reports for me? If so, what functions should I dig?
 
olegator:
Can you suggest if it is possible to use mql to connect to different servers under different logins and save html-reports for me? If so, what function should I use?

There is no such possibility in MQL4. You can do it in your library or use WinAPI.

I did it that way. I haven't done the report exporting yet. I haven't had to.

 
ilunga:

1. You have sleep standing in a loop, i.e. it must pause after calculating each point of 300

2. You draw a line between the opening price of the current chart and the "GBPUSD" chart on the current chart. That is, if you do this on "GBPUSD" you will show a line at 1


It's my first time using this, I don't know, I basically do everything the same?
Reason: