@l-andorrà thanks I'll see if I can figure it out but for each trade block I would need multiples to count the buys and sells?
Posts made by bigfoot
-
RE: Hedging Grid Mix Lots @ Boxxocodeposted in Questions & Answers
-
RE: Hedging Grid Mix Lots @ Boxxocodeposted in Questions & Answers
Right I think I've identified the problem, it is when it is in positive equity boxes 9 to 18 reverse the constant "Close_newest_at_order" 2. I'm not sure why it does this? Would a Pass or reset Counter make it work? And where would I put it so code resets the current balance/equity to run again.
I've added a close all trades at + unrealized profit but this hasn't worked.
-
RE: Hedging Grid Mix Lots @ Boxxocodeposted in Questions & Answers
What i thought this should do is:
Buy1
Buy2
Buy 3
Buy4
Buy5
Buy6
Buy7Lets say these are at 10 pip grids when buy7, buy6, buy5, buy4 reach +£ including the oldest Buy1 then it closes 1,7,6,5, leaving 2,3,4 running which then in turn become Buy1, Buy2, Buy3 and so on...
-
RE: Hedging Grid Mix Lots @ Boxxocodeposted in Questions & Answers
https://fxdreema.com/shared/gCSoXW6ge
This still closes basket trades at a loss, i think the logic only works when it is in negative equity so must be the boxes ObNb and OsNs formula (34 and 40). So when it has a positive balance the trades will close out on trade 3 at the close out money value, it reverses itself... weird but probably a simple fix somewhere?
-
RE: Hedging Grid Mix Lots @ Boxxocodeposted in Questions & Answers
@l-andorrà thank you I will remove them

-
RE: Two Grid Systemposted in Questions & Answers
@l-andorrà I'll have another look at it, I thought i did and it didn't add the lots on. My mistake is not noting what changes I've made and then I change something else again!

-
RE: Hedging Grid Mix Lots @ Boxxocodeposted in Questions & Answers
Watching it again it takes the losses when the equity is positive but there is an opposing buy/sell so if the sells are negative and buy is positive it continues to close the sells, so i think the code may be correct and I've not fully understood the logic... so it might be able to be improved when in positive equity. Or it might be not designed to run continuously on strategy tester..
-
Hedging Grid Mix Lots @ Boxxocodeposted in Questions & Answers
This is a really interesting one from Boxxocode, strangely it seemed to work first time and then I added a TP in to close the widening gap it creates from the buy/sell.
Since doing that it now seems to be bugged (even though I've rebuilt from new again. Does metatrader store code on the strategy tester?
The fault in this is it works as intended for the first sell and buy close profit and then does the opposite on the 2nd batch and forever, instead of close at £2 profit it closes £2 at loss??
If someone could test it? Or has already coded it to check?
I've watched the video several times and checked my code and all seems to be as instructed.Shared copy is:
https://fxdreema.com/shared/pgt52et4


-
RE: Two Grid Systemposted in Questions & Answers
@bigfoot Actually this isn't working as I thought. It just placing an extra trade with the actual trade. Back to the drawing board!
-
RE: Two Grid Systemposted in Questions & Answers
I think I've figured this out:

One question though? How can you put a + constant in the box instead of a number?
-
RE: Two Grid Systemposted in Questions & Answers
I've tried this and it has cleared up some of the code however I still get increasing lot size on the next trade, I have tried a formula to get the on chart volume (not ideal as I only want buy or sell volume) and put that value into a constant + starting value lot using blocks 34, 35 and 41, 42 but still getting same size opening lot volume?
-
RE: Two Grid Systemposted in Questions & Answers
@l-andorrà Hi great thank you for the advice, I will give it a try

-
RE: Two Grid Systemposted in Questions & Answers
I need to increase volume x a selected constant, so each running trade increase buy that constant for example 0.01+ Constant = 0.02 next trade would be 0.02+contstant = 0.03 and so on. I've trade adding to volume block but it opens an additional order which is not required.
The buy/ sell will be coming from blocks 43 and 51

Shared link:
-
RE: Two Grid Systemposted in Questions & Answers
Blocks 29 to 34 should open sell orders below the 1st sell trade. I've not used pending orders, just open order when n pips away from current open sell.
-
RE: Two Grid Systemposted in Questions & Answers
I'm trying to add a grid open sell trade beneath a current open sell but it's not working? Using 29 to 30 so it should open sells from n pips away from my current open sell, any ideas, please?
-
RE: Two Grid Systemposted in Questions & Answers
@jstap Oh I see now thanks!
I might be over thinking it. I'll try the "if buy grid and if sell" and swap the buy now sell now it should work...
Thanks for the tip, no doubt I'll be back again

-
RE: Two Grid Systemposted in Questions & Answers
@jstap i struggling to understand where I write that as I have to input a variable?
I've added a second grid called 2nd Grid opposite which is just copied across from the other one. So using this grid I would switch the logic of the conditions (but his isn't working)
Sorry this must be really difficult to follow. Basically when a sell is running but not it target a buy is triggered N pips above the sell is what I'm trying to achieve as well as the original "in direction" grid, so sell hits profit reopens another sell.. when it reverses a buy is opened, I guess this is a basic grid?
-
RE: Two Grid Systemposted in Questions & Answers
@jstap Hi, it uses a formula and constant so I can't easily alter that. i think i'll need to build a separate open grid order logic.


