[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 225

 
As a last resort (if missing gaps are so critical), calculate the tangent k as d(price)/d(time) rather than d(price)/d(number of bars)
 
alsu >> :
In extreme case (if missed intervals are so critical) calculate tangent k as d(price)/d(time), instead of d(price)/d(number of_bars)

I didn't specify the number of bars when drawing the line, but used the proportion and for the number of non-existent bars I specified (=20)

bars (=20) I calculated what should be the time. I used this time and calculated coefficient to get the height. Purely mathematically it should be

be correct, the error seems to occur during line drawing in "ObjectCreate(linename, OBJ_TREND...".

Assumed maybe there's a simple solution (which I didn't think of), but apparently I'll have to recalculate as new bars appear.

 

How can I select the last 2 trades already closed (from the account history list)?

It has to be something like this

OrderSelect(Parametr,SELECT_BY_POS,MODE_HISTORY)==true

how to write the correct parameter to select?

 

Hello, I have a question: What should be added to the code indicator NonLagAma (it gives a signal to buy and sell by changing the colour of the line), what would be the output of a sound signal or a graphic (eg in a separate window) with a corresponding indicator signal. I want, say, tied to a specific time frame, but that would alert multiple currency pairs....

If anybody can help or suggest something, I'd be very grateful!

I can't figure out how to do it ... :)

Files:
nonlagama.mq4  5 kb
 
costy_ >> :

Help insert Trailing

gives an error

I compiled with Kloss_.mq4 but nothing worked, thanks in advance!




It means this function is not called anywhere in the body of the program, so the compiler cuts it out of the bytecode because it is not needed.

 
oyshen >> :

How can I select the last 2 trades already closed (from the account history list)?

Should be something like this -

What is the correct parameter to select?

two last opened or closed?

 
Mr-Franklyn >> :
Search for maxima (minima) is correct, but standard deviation on the same interval is not calculated. Please advise where is the error. >> Thank you!

Please clarify in words what should end up in the StdDev8 variable

 

Guys, explain what this situation means.

Code:

if(High[0] > enve_start && enve_start > Low[0]) -> trying to catch price crossing the envelopes line.

Log entry: High[0] = 1.0726 enve_start = 1.0751 Low[0] = 1.0726.

I.e. the high and the low in the candle are the same. And so any candle.

 
001 >> :

Guys, explain what this situation means.

Code:

if(High[0] > enve_start && enve_start > Low[0]) -> trying to catch price crossing the envelopes line.

Log entry: High[0] = 1.0726 enve_start = 1.0751 Low[0] = 1.0726.

I.e. high and low in a candlestick are the same. And so any candlestick.

Does the program by any chance work by bar opening?

 
Alex5757000 >> :

Add a new bar control function to the code. Then only one position will be opened within one candle. In this case, specify New_Bar()==true in the condition to open


Thank you very much=)