Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 393

 
artmedia70:

You're looking in the wrong direction. Are you making for the tester or for the real thing? The difference is significant.

If for real, forget about the flags that can be lost in abnormal situations. It's better to look for everything in the trading environment.



For real trading, of course.

Read.
Let, a sell trade opens.
Then, MTS receives Sell_Key comment.
If trading conditions do not change in the same second (this happens rarely), then another trade will open (this will continue until trading conditions change).
BUT! We have a condition of trade opening!
If a certain trading condition is met and the throughput function X is greater than zero, then a sell trade is executed.
if(L_1 > L_2 && X > 0)
We have had a Sell trade opened, so X will acquire the value of Sell_Key and Sell_Key already has a value of -1.

The condition is not met - the trade is not executed again.
 
Link_x:

Again the question is "How do I make variable X dependent on Sell_Key or Buy_Key?".
 
Link_x:


I don't smoke such flies ... I don't understand any of your keys. What are the keys for? I do not see the algorithm of your TS that I understand, and therefore I cannot tell you anything intelligible. I'm not up to your fly swatter's level of analytics...

And there are also along with flies and keys there is some kind of pass-through function ... Creepy ...

 
Link_x:

Of course, for real trading.

Read.
Let, a sell trade opens.
Then, MTS receives Sell_Key comment.
If trading conditions do not change in the same second (this happens rarely), then another trade will open (this will continue until trading conditions change).
BUT! We have a condition of trade opening!
If a certain trading condition is met and the pass-through function X is greater than zero, then a sell trade is executed.
We have had a Sell trade opened, so X will acquire the value of Sell_Key and Sell_Key already has a value of -1.

The condition is not met - the trade is not executed again.

Familiarize yourself with functions of KimIV and you will assemble your EAs like a construction set of separate dice. It practically has everything you need to build an EA. And when you have mastered all the functions, you will learn to write similar ones yourself.
 
Link_x:

For real trading, of course.

Read.
Suppose, a sell trade opens.
Then, MTS gets a Sell_Key comment.
If trade conditions do not change within the same second (it's rare), another trade will be opened (it will continue until trade conditions change).
BUT! We have a condition of trade opening!
If a certain trading condition is met and the throughput function X is greater than zero, then a sell trade is executed.
We have had a Sell trade opened, so X will acquire the value of Sell_Key and Sell_Key already has a value of -1.

The condition is not met - the trade is not executed again.


As they say, flag in your hands. Put after the first opening, say, some bool Flag in the pipe, and there will be no re-opening of orders) And then reset it (the variable) in the fulse from time to time, depending on your conditions)))

Remember to declare it globally, or shove it into GlobalVariables altogether.

 
Sepulca:


As they say, flag in your hands. Put after the first opening, say, some bool Flag in the pipe, and there will be no re-opening of orders) And then reset it (the variable) in the fulse from time to time, depending on your conditions)))

Remember to declare it globally, or shove it into GlobalVariables altogether.


You don't need to use flags. You should not
 
Vinin:

You should not use flags. You shouldn't.

Hehehe, that's why???????????))) Terribly surprised.......
 
khorosh:
Familiarise yourself with KimIV's functions and you will assemble your EAs like a construction set of individual cubes. It practically has everything you need to build an EA. And when you have mastered all the functions, you will learn how to write similar ones yourself.


I searched, but found the wrong one.
Where is the complete list of these functions?
Or should I collect them in parts?
 
Already found it.
http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=select&id=5
 
Link_x:

Searched, but found the wrong thing.
Where is the whole list of these functions?
Or is it just a matter of putting it together piece by piece?

Here they are, downloadthem in parts, or all at once... I can add very good quality!!!)