Dynamic Levels
-
Hi Dreema,
I'm busy with a grid trading system and want to incorporate pending orders at the following level, 000,100,200,300,400,500,600,700,800,900
Can you please show me how set the "Buy pending orders in grid". to achieve this!
I have tried without success!
Thanks appreciated
Wapen
-
That option "Dynamic level" can be any value, also plain 0. This is the level where the first pending order will be placed. Well, if it's 0 no pending order will be opened there, because I think I programmed it to do nothing id the price is such, but anyway. Then you have Grid size. This is the distance between pending orders... in pips. In pips, so it depends on the market. For EURUSD if you have value of 10 there, then the distance between pending orders will be 0.0010, but you can change that value obviously.
-
HI Dreema,
Still struggling with this one!Can you wright me the following! If no pending exist place a BUY pending at the next 000,100 ex, line! I will ad the rest!
thanks
Wapen
-
I need to add some option in grid blocks to snap to some rounded price, but now there is no such option. However, I can suggest some not-so-complicated calculations. Take this for example: https://fxdreema.com/shared/KzCrYyUrd
http://prntscr.com/a6uyc1
http://i.imgur.com/97e0SBN.pngBid is predefined constant in MQL4 and it gives us the current Bid price.
Here is the description of the other functions that I used:
https://www.mql5.com/en/docs/math/mathceil
https://www.mql5.com/en/docs/math/mathfloorThe grid size does the rest.
But I think I will add some option in these blocks
-
Ok, I added this option. It's called First Price: Round Number and is measured in pips. So, if in EURUSD you write 100 (pips), this will be translated to 0.0100 and the round number will be calculated using this value.
If you Buy and if this value is positive, then the output price is rounded to the round number above (Ceil). For negative value - below (Floor).
If you Sell, then it's like in a mirror. Positive value rounds below, negative value rounds above.I was wondering if I also need to consider the "Grid Size" value, because this value can also be negative. If this value is negative, then the grid of orders is mirrored.
-
Thanks, But in what block did you add the "First Price"
Appreciated!
-
Thanks Dreema,
Found it, working like a charm!!!
Much appreciate your work!!
Regards,
Wapen
-
I decided to rename "Start price" to "First price". With this set of parameters you are defining one price level that is the Open Price of the first pending order. From that price the Grid Size value is used to calculate price levels of the other pending orders. So everything starts with that first price level.