Less than "n" trades are running
-
I have set a "Less than "n" trades are running" block up at the top of my buy/sell tree, with the "Less than" entry pointing to a variable in the Variables list called "Less_n_Trades". This value is set to 3.
I understood, therefore that this would only allow a maximum of 2 trades to run because the help text says, "This block passes only if there are less than a number of trades currently running".
However, running a USDJPY backtest the EA allows at least 3 trades to be open.
Is this expected behaviour of the block?
-
The fact is that even I am always confused with this block
But I made another one that you can try instead - "Check trades count". At least it sounds better. -
OK. I've now tried this with the "Check trades count" block. Again, I have a variable called "MaxTrades" set to 2. Inside the block I have "Compare <= lower than or equal to", and "Orders count" pointing to the "MaxTrades" variable.
Unfortunately on my USDJPY pair I still get at least 3 trades running when there should only be one or two.
-
In other words, if trades count is <= 2, then execute the next block, which is for example "Buy now". If there are 2 trades at the moment, then 2<=2 is true, so it goes to buy 3rd one. Try with "< Lower than".
-
Of course! You are quite right - again!

Thanks.
-
It's amazing how there are so simple things, but our minds feel hard time to think about. This is one of these. When I have to use this block I'm always trying to explain it to myself like this "If count is... no, if trades are... ummm... how many... no, no... ummm... ok, let's start again... sooo it trades are... count is... how many?... damn, I'm stupid!"

-
I enjoyed your last post a lot! I laughed out loud too! I must also congratulate you on your use of English. There are many people in Scotland who could learn from you! Even worse, there are many who couldn't point to Bulgaria on a map!

-
I'm still struggling with this - sorry!

I'm using "Check trades count" < MaxTrades (a variable which is set to 1).
I'm still getting 2 trades taken. I can't understand it!
-
I got only 1 trade here: http://fxdreema.com/shared/DZtLsRr3b
-
This is very strange. I made a modification to another unconnected block, and now I'm getting just 1 trade. At least its working!
