Two Grid System
-
How to reverse grid order?
You will see it works in the direction (above buy and below sell) as designed but I want to add an additional grid logic to:
buy order opens a sell when price goes x pips below the last open (not closed) order and vice versa for sell.
https://fxdreema.com/shared/u1V1Z7VJd
original code is used from boxxocode so credit to him

-
I think you need a - in front of the value this will turn a positive into a negative, or a negative into a positive
-
@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.


-

-
You can do it separately but instead of right clicking and adding a content/variable write the name instead, like -variable, if you add a shared link everything can be seen without needing pictures
-
@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?
-
To be honest I am not sure of where you want it but you would use it something like this picture:

-
@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

-
@bigfoot You are welcome

-
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?
-
Do you mean to place a pending trade above or below? What blocks don't seem to be doing as required?
-
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.
-
It is on the on trade tab, move it to the on tick tab
-
@jstap Thank you I'll give it a try

-
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:
-
You should remove blocks 35 and 45. They are redundant. Then move blocks 41 and 49 to those positions on top. Otherwise your variables will be modified avery single tick. That's why values don't match your expectations.
-
@l-andorrà Hi great thank you for the advice, I will give it a try

-
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?
-
I think I've figured this out:

One question though? How can you put a + constant in the box instead of a number?
-
@bigfoot Actually this isn't working as I thought. It just placing an extra trade with the actual trade. Back to the drawing board!