self updating/refreshing grid, compare two groups of trades
-
the image is not working. There is nothing to click on.
-
Ooops, maybe Lightshot decided to stop our behaviour of posting direct links to images
Edited! -
Ok, thanks. This solution I have already tried but it was not working like expected and Indicator-shift would work. I think I have to choose a step-solution and have to accept an increase of block ammount.
-
hello,
I would like to create an pips-counter or pips-package-counter. I don't know how to get the current distance from the last open position in pips or price-fraction. There is "in loop" "open price level" but how to use it to count for example 30pips packages. "pips away..." is not helping because output remains active after market is above spacing value.
For example: buy order is open -> market is 30 pips in profit -> variable is count up -> market is 60 pips in profit -> variable is count up again ....
-
You can connect multiple "pips away..." blocks like this: http://prntscr.com/6t8ctk The first block is the longest distance. This makes "if... else if... else" logic. And yes, it looks ugly, so I'm gonna write a new task to my to do list to make it somehow easier

-
I don't think that will work because I need a value, a number to calculate lot size later and actually up to a few hundred pips (depending on market).
Is there no way to create something that delivers a value, that is proportional to an opened trade's distance from current price. -
I don't really know what you are trying to do. Maybe you just need the value of Ask-OpenPrice or OpenPrice-Bid?
-
I need the current distance as a value (pips or double value) of the newest open trade (for example the latest buy). Profit or loss in pips will do that but I need it always for one lot only. I need a kind of ruler.
"in loop" "profit ammount of trade" / "Volume size" (for each trade 1 newest trade) could work, I hope.
-
Real Lot Size * Profit / New Lot Size
so if you have a profit of 10 from a trade with 0.2 lots, this is the same as profit of 20 from 0.1 lots.
As a code (to not use Formula block), this will be:
OrderLots() * OrderProfit() / 0.1or...
OrderLots() * (OrderProfit()+OrderCommission()+OrderSwap()) / 0.1and 0.1 can be some Variable as well
-
I have tried this

but the profit values are too big

What is wrong here?
......
Screenshot_2.jpg
Screenshot_3.jpg -
Damn, you already have so many variables

Profit as pips? -
Why not, it is selectable but any other value will also do. It should be a ruler. What I am expecting here is that I get on every candle (every tick) the current profit/distance for one lot from the last open buy trade.
The idea behind is to convert this distance value into lot size and use it when a new signal is generated to make EA dynamic or auto adapting to market situation.
-
Are you sure about the formula you want to use? You are asking why values are so big. Maybe because it's just the way it is using this calculation. You have Pips/Lots, so let's make some examples here:
50 pips, 0.1 lots => 50/0.1 = 500
10 pips, 0.01 lots => 10/0.01 = 1000For me, such a big values looks normal

-
my calculation was wrong but how to do it to get profit for one lot? This was also not working as expected:
(trade profit from 0.1 lot) / (trade lot size 0.1/0.01) = 100pips profit / (0.1/0.01) factor = 10pips profit for one lot of 0.01
I am dividing here the profit from 10 lot with the ammount of lot on the latest trade.
-
You can see my idea, or what I believed that you want to do: viewtopic.php?p=8897#p8897
When it comes to pips... I don't know really. To be honest, I am pretty bad at mathematics, so my mind automatically rejects to put pips and lot size in the same formula
Pips = some price distance, Lot size = money amount. There is a parameter that connects those two worlds (how much money for 1 pip at a given lot size), but it's value can be always different, depending on the currency, the current price and the deposit currency. So, my suggestion will be to work only with the money values - lot size, profit (in money), balance, equity and so on. -
thanks, money is working correctly.
-
Unfortunately I have problems to understand the code of the Super Money Grid EA I have attached. Could you "tell" me how and where they calculate the take profit. What logic/method do they use. I would like to add this to my EA.
......
Super Money Grid.mq4 -
-
You can try to add this function CalculatePipValue here https://fxdreema.com/studio/MQL4 and then use it in Value -> Numeric like this: CalculatePipValue(0.1)
-
thanks so far. I will try the obove mentioned later.
Now, It is necessary to use manually opened trades with group trades. It is possible to use groups in one block (111,110,500,...) but I need to add manually opened trades to blocks (111,110,500, manually opened, ...). To use "All" is not possible because there will be groups (600,800,...) that should be not take into consideration. Do manually opened trades have a group number too?