1 (edited by hannahis 2017-10-11 11:05:59)

Topic: ANY or ALL Closing Conditions are fulfilled?

Hi Popov,

Just for some clarification, which rules does the strategy use when it enter into a Short position?

Does it use

1. The reverse setting of the Opening Conditions? or

2. The setting of the Closing Conditions?


For Eg My strategy settings are (just for discussion sake)

1. Opening Condition - MA 25 cross 50 (fast MA cross Slow MA upward)
2. Closing Condition - MA 14 cross 25 (fast MA cross Slow MA downward)

I understand that the strategy will open LONG when MA 25 cross 50

How about Short position?

I'm assuming that Strategy will use the REVERSE of Opening Conditions to enter into a SHORT position right?

In this case it is using MA 25 cross 50 downward, right?  In another words, it is REVERSING the OPENING conditions.

It is not using the REVERSE Closing Condition, MA 14 cross 25 upward (in another words, it's not REVERSING the Closing conditions as the Opening Conditions for SHORT/SELL position, right?



The function of the Closing Conditions is to trigger a close to the position. The fulfillment of ANY of the closing logic conditions will give a close signal (unlike Opening Conditions which must ALL be fulfilled in order to give open signal).


Popov, I'm confused by the above statement. 

If I have 5 Closing Conditions, if ANY one of these 5 conditions are filled, the position will close?

1. I always assume (and it's my mistake) that the whole idea of putting down 5 conditions is to ensure that ALL (not ANY) of these conditions need to be fulfilled in order to Close the position.

2. If I wanted ANY of these 5 Conditions to be fulfilled, I'll put them as Logic A, B, C, D, E.  So that if ANY of these 5 logic (A to E) is fulfilled, close the position. 

3. If ANY of these 5 conditions are fulfilled, the position will be closed (as according to the statement), then what's the point of having the additional function of separating the logic into A, B or C?  Every conditions naturally becomes "A, B, C" respectfully regardless whether you group them into A or B, then.

4. If the statement is correct, then the implication will mean that essentially, we are all only allowed to have 1 Closing rule.  We may have many types of closing rules such as A or B or C but each of these types are only allowed with 1 closing conditions.

Kindly clarify this execution process as it going to affect my strategy development tremendously.

Re: ANY or ALL Closing Conditions are fulfilled?

What a lot of people do when developing complex strategies is to insert comments after each logic so that they can refer to the journal or log file to determine what happens, ie which logic was the cause of a transaction.

It is simple to do this. and then you will not be dependent on others to develop your strategies.

Look up commenting and print statements on the web and develop a system of your own for this very important aspect of development.

I think a 'Print' statement will work for this.

I think that some reserach will show you how to actually mark on the screen what each transaction is.

and then you can just observe the journal to see what triggered each exit.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: ANY or ALL Closing Conditions are fulfilled?

Thanks for your tips. I've too many EA to journal all these transaction.  However, I do agree it is very important especially in the beginning of my Ea development stage to identify the correct parameters and it's respective entry/exit accuracy.

However this issue that I'm posting here is about the Closing Rule.  Whether it is ANY of the conditions or ALL of the conditions need to be fulfilled in order for the Strategy to close the position.  This is a BIG difference.  And I need Popov to clarify this execution matter.

Re: ANY or ALL Closing Conditions are fulfilled?

Hello Hannah,

For 'Opening Logic Conditions' the rule is ALL.

For 'Closing Logic Conditions' the rule is ANY.

When you think about transactions in general, this is what makes sense.  The conditions for opening a trade need to be more exact -- i.e. all the indicators must agree this is a good opening signal, hence the ALL.

However, closing a trade doesn't have to be as strict -- hence the ANY.  Can you imagine what would happen if the closing conditions were strict?  You would then run the risk of trades never closing.

5 (edited by hannahis 2017-10-12 12:44:49)

Re: ANY or ALL Closing Conditions are fulfilled?

Hi Sleytus,

1. If ANY is the correct setting.  What's the rationale of having logic A, B C etc grouping cos every single additional conditions is by default, A, B and C... 

Popov, can you kindly clarify whether the statement is true and if it's true, what's the rationale of having logic grouping, what difference does it make?  And can you kindly change such restrictive setting and allow users to determine how many closing rules instead of being restricted to 1.

2 Often the Closing is MORE crucial than the opening.  You can have a great opening.  But if your closing is bad, you can turn a profitable trade into a losing one.  I believe if you observe most trades, you will often encounter lots of positions that have floating profit that turned into losing trades.

Similarly if you have a good exit, you can even turn a losing trading into a winning one.  Again we can also observe that not all our trade go into profit all the time at the point of entry but it however can turned into a profitable trade is the closing is good.

Hence, Closing is by far more important than a Opening.  Cos it's your closing that determine your profit opportunity.  Tell me, what other factor besides money management that determine your profit level?  If you have an excellent Opening without any closing rules, you still have nothing cos your trade is still in question of whether it's going to be a profit or lost.  Until you close it, then can we know the profit made.

3.  To enforce all traders to stick to only 1 closing rule is detrimental and doesn't allow one the freedom to try out lots of trading strategies.  How to achieve accurate closing with just 1 rule.  I'm not talking about many different types of 1 rule closing.  If Any is the option, I may have many types of 1 rule closing.  But it's hard to achieve accurately and timely closing with just 1 rule to filter out all the NOISES.

4. DON'T mistaken STRICT as ACCURATE.

Yes, Opening rules have to be strict and accurate. 

What do I mean by accurate is that you use many rules/conditions to reduce "randomness" or noises.  So as to reduce the margin of errors or false signals.  Less error means higher Entry/exit accuracy.  Accuracy is to avoid false entries.  Reasons why most Breakout EA fail is because it fail to cross out false signals that often arise in Ranging and consolidation time.  So accuracy is to rule out such false signals.

What do I mean by Strict.  Strict means that my EA "react/respond" slower in my opening rules than my exit rules.  It's the issue of timing that will affect our EA speed of responding to market changes.  Nothing to do with accuracy.  My Closing may not need to be strict/slow but it still need to be accurate, ie. use a number of rules to cross out false exits.  Premature exits due to false signals mean lost of potential profit (if I exit later) or means, suffer unnecessary loss (if only I waited longer instead of closing too fast).

Just for illustration: if I use "Cross over" or "Higher than" as in my Opening conditions, I don't use "Lower than" as my Closing conditions. Why? By the time the Fast MA 50 cross Slow MA 100 downward or lower than, many pips have gone. So I'm not going to use the same "strict" or slow rules for my Closing. 

Or

If I use MA 25 cross 50 upward as my Opening, I don't wait till MA 25 cross 50 downward as my closing.  It's too late (too strict/slow may be a better word).  I use a faster responding parameter or a faster setting like "change direction downward".


Likewise, Closing rules also need to be "accurate" in terms of removing the error of margin with the use of many rules.  However, it need not be strict in terms of the parameter or rules setting.  However, it still need to have adequate among of rules for it to be as accurate as the opening to reduce margin of errors.

So strict basically means, we wait a bit longer (parameter or setting) to "confirm" that the trend really have formed to enter.  But for closing, we don't want to be so strict/slow to wait for bigger confirmation in order to exit.  We respond a bit faster or exit earlier such as with a faster setting or parameter.

6 (edited by sleytus 2017-10-12 13:16:34)

Re: ANY or ALL Closing Conditions are fulfilled?

Hello Hannah,

I wasn't suggesting that Close is unimportant, just that Open signals determine whether you are buying or selling.  If you are wrong on the Open, then you will lose no matter what.  But with Close, there are multiple points where you can close with a profit.  If your Open signal was correct, then the worse that can happen with Close is you leave some money on the table.

Not that I've been trading that long, but it's been my experience it is more important to get the Open signal right.  That is why most strategies use more than one indicator -- to confirm an open signal.  And that's why the 'Opening Logic Conditions' rule is ALL.

In this case STRICT *is* more ACCURATE.  The more conditions that are satisfied, the greater the probability it is the correct decision.  Again -- this is why most strategies employ more than one indicator to confirm the direction of a trade.  Of course, the trade-off is that if the Open conditions are too strict, then they will never all be satisfied and you will never trade.  This is simple logic -- not something I made up.

Your last statement -- "But for closing, we don't want to be so strict/slow to wait for bigger confirmation in order to exit." -- is exactly correct.  That is why ANY is used for the closing logic conditions -- because it is less strict.

7 (edited by hannahis 2017-10-12 15:32:24)

Re: ANY or ALL Closing Conditions are fulfilled?

ANY in this case means only 1.

How to create accurate exit with LTF with only 1 rule?

ps: Hi Sleytus usually when I reply I tend to write more than your intended question or statement to cover more grounds or pointers for the general public, so my apologies if in any manner I may come across as making some assumptions or statements or clarification (but not intented to refer to you directly). 

So when I said closing is important,  I'm not saying you meant it to be unimportant. Again I hope in no any manners, have I grieved you, I have no intention to put your sharing in any negative manner.  In fact, I appreciate your curiosity and you questions allow me the opportunity to use it as sharing moments to convey some of my trading perspectives for the benefit of anyone who may find it helpful.

Once again, thanks for making this forum a better place where ideas can flow and making a difference to our  FSB community.

Re: ANY or ALL Closing Conditions are fulfilled?

The closing conditions are 'OR' statements. only one of them will close the transaction....

That is why I suggested that you include a print statement so that you can look in the journal to see which one was used to close a particular trade.

This is very simple stuff...!

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

9 (edited by hannahis 2017-10-12 16:26:33)

Re: ANY or ALL Closing Conditions are fulfilled?

Again, the issue at hand here is not that I'm confused with which one of these closing conditions are the one that closed the transaction.

Can there be any way I can write it any more simpler for anyone to understand?  I believe Sleytus understood my point.

The issue at hand here is I DON'T WANT TO HAVE ONLY 1 CLOSING CONDITION.

Not that I've 5 closing conditions and either one of these cause my trade to close and that I don't know which one that close it and therefore i need to journal it down so understand which one closes it.  This in not the bone of my contention.  So it has NOTHING to do with journal taking etc.

I have hundreds of EA running with thousands of transactions daily, imagine, if I were to follow your suggestions, Is it really going to be that simple?  Yes it's simple (to understand) if one only has a few EA to deal with but not that simple (to carry out) from my perspective to journal thousands of transaction daily.  I trade at times 400 lots per week (real account), that's very time consuming to handle journal for every transactions).  Anyway, back to the main issue, it has nothing about journal, or understanding which conditions closed my trades.  I want to have more than 1 closing rules so that I can use LTF for my closing  to reduce margin of error.  And if Popov meant it to be that way, whereby ANY conditions is fulfilled, then what's the point of providing Logic grouping and that's so misleading.  It was because of this that I assumed (my mistake) all these while that it meant to be the same as Opening, whereby ALL conditions have to be fulfilled, not ANY.

Tell me what's 1 very good closing rule one can use in both Ranging and Breakout trends (that can handle all kind of market situation for the Strategy to be robust).  What is that 1 good universal closing that we can all use to achieve accuracy and avoid false signals?  Can anyone here kindly share with me 1 Closing Condition that meets such criteria?  If this 1 closing rule is so good, we probably also be using this 1 rule also for Opening.  Then probably we also need to restrict opening rule to only/ANY 1 condition

To restrict Closing to just 1 rule is as absurd as telling people to use only 1 rule for Opening.  Why?  If Closing is not more important or at least equally important, then shouldn't Closing also be treated with due respect and be allowed to use more than 1 rule?  Can you imagine buying a software that only allows you to use 1 rule for your strategy's opening, you would have rejected it in the 1st place.  Now if Closing is equally (if not more, important), likewise, it is rather weird to assume that one can develop excellent and robust EA to handle all market conditions (avoid false signals, etc) with just 1 closing rule.  Is trading that easy and simple?  Well we all be millionaires by now.

Re: ANY or ALL Closing Conditions are fulfilled?

I guess you are having a hard time understanding that you have been provided the answer already.

There is no need for you to be including all this extraneous  material about your theories and whatever, this is just clutter.

There is no need for you to be sharing your expeiences and trying to be a guru.

Let's keep the conversation as to how the program functions so that people are not mislead.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

11 (edited by hannahis 2017-10-12 17:08:57)

Re: ANY or ALL Closing Conditions are fulfilled?

You think I'm just asking for an answer?

I'm asking for a CHANGE

What am I misleading people into thinking?  Misleading people into thinking that 1 closing rule is sufficient to develop a robust EA?  Misleading people that Closing rule is ALL but not Any?  In fact by raising this issue up, I'm preventing people from thinking that Closing rules apply to ALL.  I'm warning people that if they ever think it is ALL, it is not, it is ANY.

What's the point of the forum if it all just about functional questions.  Are you telling the rest of us to stop requesting for better features and improvement?

So you are also suggesting that I should stop my sharing?  Did I claim to be a guru?  If I sounded like one, then it's your own interpretatio/imagination.  Not mine.  If my sharing make no sense and if I'm uttering nonesense, then why would people write to me to ask further (nonsensical?) questions?  What's the problem with you, why you enjoy making personal attack and targeting at me? Who appointed you to be censoring who should be sharing more and who should stop sharing. I thought we can put this past all behind us and start a new and here you come again.


If there isn't any positive thing to add, kindly avoid being judgmental and making personal attack.  Saying that my sharing is just clustering and advising me to stop sharing my experience, is to tell FSB users to keep to themselves and not share any thing they have gained or learn for the benefit of the community, isn't your role to speak on behalf of the rest of the people in the forum.

I understand you have a personal grudged against me.  This I know for a long time.  So if you don't like my post, just don't read it.  Otherwise, just keep to the topic and avoid personal attack.

Re: ANY or ALL Closing Conditions are fulfilled?

Please, stay on the topic.

You asked for inmformation and you received that.

There is no need for you to share your stories, theories.

If you want a change to the software, there is a thread for that that Popov reads carefully.

Please respect the forum and the people that use it.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

13 (edited by hannahis 2017-10-12 17:28:29)

Re: ANY or ALL Closing Conditions are fulfilled?

Got it, I'm out of this forum.

Re: ANY or ALL Closing Conditions are fulfilled?

You can always use logical groups for exit conditions. We have AND logic inside a group and OR between groups.
If you set all exit conditions to be in one logical group, the strategy will exit when ALL exit rules are satisfied.