[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
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.
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.
I meant the first line - you posted "without the assignment sign".
Indeed, I apologise for the inaccuracy, copying error.
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!
Yes, it is drawn. But it's not OrderModify, it's a stop loss set when a market order is opened.
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
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.
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?