[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 114

 
rensbit:


As an alternative

where timeShift - shift from the current bar (in this case, the shift to the future)

This is what I'm doing now, but in this case the Line will be linked to the price (e.g. to the last price Bar).

I have seen (in the above-mentioned robot) that it is possible to create an area to the right of the chart and place objects there that will not move (neither horizontally nor vertically - regardless of the price position on the chart), but how could such a thing be implemented?

 
rensbit:

Use the standard Ishimoku indicator, it will be faster and easier)))

As for opening trades - see/show what the log says about it


I have to figure out what to program and how to do it, I can't understand anything with a standard ready-made one... ... I don't understand the reason... If you're trying to do it with a standard one I'll have to find out what's going on...

The log is empty... as if the condition to open a trade has never been fulfilled...

 
chief2000:

This is what I'm doing now, but in this case the Line will be linked to the price (e.g. to the last price Bar).

I saw (in the above-mentioned robot) that it is possible to create an area to the right of a chart and place objects that won't move (neither horizontally nor vertically - regardless of price position on the chart), but how could that be implemented?

With MQL4, it can be implemented only by recalculating the offset from the current bar (or maybe I just do not know other options). OBJ_LABEL has parameters OBJPROP_CORNER, OBJPROP_XDISTANCE, OBJPROP_YDISTANCE.

Xaoss1990:


I have to figure out what to program and how to do it, I can't understand anything using a standard, ready-made one... I'm not sure why... I'm trying to figure out what's going on... I'm not sure why it's going on...

The log is empty... it is as if a condition to open a trade was never executed...

Using standard indicators (if possible) you get results without the possibility of getting the indicator code wrong. And then the code of the Expert Advisor comes down to

double tenkan_sen=iIchimoku(NULL, 0, 9, 26, 52, MODE_TENKANSEN, 1);
double kijun_sen=iIchimoku(NULL, 0, 9, 26, 52, MODE_KIJUNSEN, 1);
if (tenkan_sen > kijun_sen){/* BUY */}
if (tenkan_sen < kijun_sen){/* SELL */}

I'm exaggerating.

 
Xaoss1990:

The point is that your arrays are dimensionless. To help: ArrayResize().
 
Vinin:


As an option

OBJ_LABEL only

is not quite what I wanted. Here's the code: #Signal_Bars_v8.ex4 (attached). It's glitchy, but it's convenient because it shows dynamics on frames. And you can also see it from another room:). I've got a similar one, but only mine colors the text. All the same, a small rectangle is more visual.
Files:
 

Found an answer to my own question, if anyone was interested at all:

nemo811:

I have faced with a problem: MT4 conflicts with Windows 7 (terminal lags even with 1 simple indicator on a chart, in MetaEditor it is impossible to edit scripts or advisors, and there are other little things). Running compatibility with earlier versions of the OS solves this problem only partially (EA and script editing becomes available). I suspect I'm not the only lucky one. Can you please tell me if there is a solution to this problem or where I can read about it?

Solution:

Properties -> Compatibility -> check the box "Run this program as administrator".

 

Can mql4 add an unlimited number of records to an array if it is not initialized to this number of records?

For example, the following array was created

double wArray[0][6] ;

and in the loop I need to add to it an unknown number of strings, is it possible?

 
Guitar:

Can mql4 add an unlimited number of records to an array if it is not initialized to this number of records?

For example, the following array was created

double wArray[0][6] ;

and in the loop I need to add to it an unknown number of strings, is it possible?

for ()
 {
  ArrayResize(wArray, ArraySize(wArray) + 1);
 }
 
Zhunko:


Thank you :)
 
rensbit:

MQL4 tools can implement it only by recalculating the offset from the current bar (or maybe I just don't know other options). OBJ_LABEL has parameters OBJPROP_CORNER, OBJPROP_XDISTANCE, OBJPROP_YDISTANCE.

There must be a solution, because I personally ran that Expert Advisor in MT4.

I will try to find it to understand how it was implemented.

Anyway, thanks!

Reason: