Count Trade Lots
-
@fxDreema what if I only want to count buy only or sell only?
-
Is there an easy way to count the total number of open lots for buy and sell orders
So in short if I have three open buy trades, one of 0.01 lot, one of 1.5lots and one of 2 lots it would return 3.51I must have overlooked something but I just cant find it
PS after 2 weeks holliday it was refreshing to see some new colors to the website, looking forward to discovering the updates to the software, cheers
-
This easy way is on the way. It will probably be a block that will select group of trades and then in Condition (or any other) it will calculate different values using those selected trades.
But in fact this can be made pretty much easily using Variables and the result will be better. In "For each Trade", in it's second panel "Variables", if you have variable that is V1 there, write this in it's input (the orange color): V1+OrderLots(). Then use the yellow output of this "For each Trade" to connect something else.
-
Thanks
I will have to look into how to do more with the variables option, I am missing out on something there
But happy to see the lazy *ss option in a prefigured block as well
BrilliantWould you mind droppping a message when the block has been added, so I can update my Ea before market open on Sunday night
Cheers
-
Well, I am always doing something, I didn't said that I will start doing exactly this right now. And you know... even if I do something new, it's probably not the best idea to use it right away.
-
Sorry, my enthusiasm got the better of me...
When I get back from a holiday I am way too excited to implement my new ideas
-
The thing is that if we select a group of trade in a single block, this will be just another term "group" in the builder. So I decided to color-code those groups. Instead of input field where you can write 1, 2, 3 or whatever, imagine that there is drop-down input with few options for color - red, green, blue, yellow... So in one block you select group of trades and certain color is associated with this group, then in "Condition" you can select that color and work with that group of trades. Does this sound good or it's better to use numeric or string values for this?
Another issue is, people don't really get the idea of such blocks that are loading something trade in the memory (like "For each Trade"). I was thinking to not making new block for this, but doing all the selection of trades in "Condition" directly. The problem with this is that 1) you need to manually edit all settings for each operand in each Condition block and 2) selecting group of blocks over and over again is not the best idea.
Well, it's very similar when using indicators. If I want to use the same indicator in multiple Condition blocks, I will select it over and over again in the blocks, then MetaTrader knows how to reuse it.
If you have some ideas, what will be the best way to do this...
-
Ok
The color coding sounds nice, visual probably easier to understand. But the current numeric is easy enough, especially if changing to colors is creating a lot work for you
Once you understand it, it works you knowSame for the changing "for each trade " type blocks
I prefer to et it up once instead of having to do it over and over again
It is actually quite logical, you select the trades you wnat to work with and then you apply all kind actions after itI was just thinking that
if I have some variables like : number of buy orders open, total amount of buy lots open
you might even add them under account trade statistics, no need to create another block
just an idea, dont know if I make sense -
I have been trying to create the LotsCounter using your suggested variable method
I cant seem to figure it out
It just keeps on counting, so the total amount of Lots just keeps going upSome help please?
-
What if you reset the value somewhere (before counting)?
-
Tried that, but it keeps counting and counting
sorry -
In case you want to ahve alook
https://fxdreema.com/shared/wevpLlGdc -
NO even the counter for number of orders has stopped working
-
Just put 0 here: http://prntscr.com/88w5vs
This block "Counter: Reset" does something completely different and it does not work with Variables.
-
Thanks
That works perfectly
I also Made one that counts the orders
Cheers
-
@Slashes Then you will ned two different variables, one for buys and another one for sells.
-
can you please reshare this project?