[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 3

 
IgorM:

I don't have the code handy, but I did something similar for myself, but not like that: I remembered the time of the bar at which there was a signal, and when an order was placed using this signal, I reset the signal time to zero, so on and so forth:

Well, if the question is about fighting only requotes, then look through Igor Kim's topic, almost all functions for placing orders have a parameter for how many times to try to place the order
Thanks for the code! I set the number of attempts to open the order in my EA.
 
Zhunko:
If we're talking about just one layer, there's a property called OBJPROP_BACK for graphical objects that makes them over or under the graph.


"Gets/sets the background display flag of the object"

Yeah, man. You don't pay attention right away...

Thank you very much!

 

Yeah, man...

THE MODERATORS ARE WORKING.

QUESTIONS on the fly - ANSWER on Sakharov

 
freeDRIVER:

Yeah, man...

THE MODERATORS ARE WORKING.

QUESTIONS on the fly - ANSWER on Sakharov


Is there a problem ?
 
r772ra:


Igor Kim's functions, simple and convenient.

Kim wrote his functions a long time ago, there were no DCs working with 5 digits then, and consequently, these functions will not ALWAYS work correctly, for example, these lines:

  p=MarketInfo(sy, MODE_POINT);
  if (p==0) if (StringFind(sy, "JPY")<0) p=0.0001; else p=0.01;

Second line can be simply removed at all, not to "strain" code or check for exception of error ZERO_DIVIDE can be written in this way:

if (p==0) return (-1);

It would be more elegant to write the Point value into a global EA variable in init() and take it from there.

 

Folks, could you please advise me? I want to try 2-3 EAs on a demo account, on different currency pairs. But if I open any other chart, the first EA is disabled. It only works in the active window. What to do?

 
Roll:
ask, bid?
Ask and bid, are downloaded separately because they are needed for the multi-currency unit.
 
Oldgames:

Folks, could you please advise me? I want to try 2-3 EAs on a demo account, on different currency pairs. But if I open any other chart, the first EA is disabled. It only works in the active window. What to do?


Change the EA, in theory it should not care how many windows are open.
 
Oldgames:

Folks, could you please advise me? I want to try 2-3 EAs on a demo account, on different currency pairs. But if I open any other chart, the first EA is disabled. It only works in the active window. What to do?

What kind of "magic" is this? And how do you decide it's disabled? Does it give you a message?
 

Good day to all!

I've encountered this problem (code in shortened version):

double raz, ArrHigh[]; //---Массив ArrHigh[] в программе инициализируется 
ArrHigh[i]=High[i];
raz=(ArrHigh[0]-Close[i])/Point;

As a result, the variable raz gives out a value of 156321 (i.e. a price value without a dot of 1.56321) every time it is run on the first iteration of the loop,

At subsequent iterations everything is fine. Why is this so?

Reason: