[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 307

 
GarKain:

How can I make the difference between opening orders of the same sign be 1 bar?


We need to compare the time of opening a position with the time of the current bar opening Time[0]. If the time of opening a position is more or equal to the time of the bar opening, the Expert Advisor will not open a new position. When a new bar appears, Time[0] will change its value to a later time and this comparison will show that the position has not yet been opened on the current (new) bar and we can trade.

By the way, your question can also be broken down into 2 sub-questions:
1. At the current bar a position was opened and managed to close, but we are still waiting for a new bar.
2. A position was opened on the current bar and managed to close, so we can open a position again on the same bar (i.e. we can open 1 position on the same bar simultaneously).

 
FAQ:

No, there can only be one result:


Thank you, I will try.

 
drknn:
Well, due to the fact that in both cases the same value is returned from your subroutines - price Bid, then one of these two functions can be dropped from the code. If the returned values are different, you can, for example, assemble them to a string - return from the subroutine these two values, separated by some separator, such as semicolon. And return them as a string. Then, in the main code, extract 2 values from the string and convert them to double.

Is this the same as what the FAQ suggested ? If not, can you write an example?

 
Roman.:

Hello! As people have already commented on your question, I would like to ask: Are you the 2008 champions?

If so, would you tell us about your GRAAL, without revealing all the "secrets of the court in Madrid" and without telling us "all the tales of the Vienna Woods". Just lift the veil a bit... You can - in this branch, I'm sure, people will find it useful!

I'm actively preparing for the tournament myself...

Thank you!


Yes, that's me. I don't write much on the forums, because Russian isn't my native language and it takes a lot of time.

After 2008 I`ve been writing programs for ATC based on "all or nothing" (big TP SL and lots), because now on the pips it`s hard to earn so many pips to win. In real trade I use pips, because it's the closest to me and understandable. :)

 
abeiks:

Is this the same as what the FAQ suggested ? If not, can you write an example ?

string Stroka=r_master_Ticket[as]+";"+ClientTicket+";"+r_master_Lot[as]+";"+LOT;// у меня в коде так
The variables are initialised earlier. Conversion of types to lowercase values will happen automatically.
 
drknn:
Variables have been initialised previously. Conversion of types to lowercase values will occur automatically.

Thank you!
 
abeiks:

Yes, that's me. I don't write much on forums as Russian is not my native language and takes a lot of time.

After 2008 I'm writing programs for ATC based on " all or nothing " (big TP SL and lots), because now on pips it's hard to earn so many pips to win. In real trade I use pips, because it's the closest to me and understandable. :)


WELL DONE!!!

And may be some simple more or less alive strategy on Pips (formalized, for MT4)?

 
Can you tell me how an if(a>b || c>d) condition is handled? Is it left to right, right to left, or can it be handled differently in different cases?
 

The coordinate when creating the object is not the coordinate of the cross itself (it is highlighted if you hover over it with the mouse).

Question: how do I create an object based on the coordinate of the cross and not the object itself?

 
silhouette:

The coordinate when creating the object is not the coordinate of the cross itself (it is highlighted if you hover over it with the mouse).

Question: how do I create an object based on the coordinate of the cross and not the object itself?


Special arrow codes that indicate the exact price and time. Can be the following values:

Constant Value Description
1 Upward pointing arrow with a prompt to the right(↱)
2 Down arrow with guide to the right(↳)
3 Left pointing triangle(◄)
4 Symbol Dash (-)
SYMBOL_LEFTPRICE 5 Left price marker
SYMBOL_RIGHTPRICE 6 Right price marker

Special arrow codes cannot be used in custom indicators when setting the arrow value for lines with DRAW_ARROW style.

Reason: