Script to create a hedge Order
-
Hi, i was wondering if someone could share a script that will open a order two, three, four times as much in the opposite direction with X points of distance???
-
What do you exactly mean by 'two, three four times'?
-
@l-andorrà for exemple: i have an Buy order opened with 2 lotes, so if i use the script.. it will place an sell order of 8 lotes (in this case 4 times bigger) 100 points below the buy order of 2 lotes
-
Will the first trade be created by the script or manually?
-
The first trade will be create manually, then when using the script it will open 1 order like the exemple before
-
Doesn't sound difficult initually. Could you please detail all constants (pip distances, lots...) and conditions required (indicatr required, timing...)?
-
@l-andorrà The details would be :
Distance >> 100 pips of distance.
LOTS >> I know that the easiest is to just put the "0.16 lots" fixed, But if would be not to much to ask i would like the script to "read" the order opened and then create a opposite order with the number of lots multiplied by 4 (if i have 0.04 >>> it would open 0.16)
If i have a "BUY order opened" the sell would be with the price 100 pips lower.
Exemple:
Opened Order BUY Price 12080.5
Then Place Order SELL price is 12070.5If i have a "SELL order Opened" the BUY would be with the price 100 pips more
Exemple:
Opened Order SELL Price 12080.5
Then Place Order BUY price is 12090.5what would be this "Conditions required" ? i would like to be just like if i open the "Create order" and place a order in that price. The order should stay "forever" until i get rid of it.

So would be something like this, when i double click the "script" would appear my order with all the details i explained right away.
-
Ok. One more question please. How many open orders can be active simultaneously? Just one buy and one sell at the same time or more?
-
@l-andorrà simultaneously would be more then one of each.
Would be Like two BUY's and two SELL's, because my setup that i use to trade is something like this:
Exemple:

So i just want some steps automated and more fast to do it.
Is the example good to understand?
-
Hi this this is what you need:

It's a martingale after all. Just put all required conditions before this block and then play with all parameteres untill you find the combination you are looking for (those shown here are the ones included by default). Let me tell, however, that martingales are never a win on the long run. I hope it helps.