Hi dear coders, I really admire you efforts helping people around here to automate their trading ideas which would be beneficial to most of us. I really would like you guys to help me developing my idea into an EA. My Idea ( which other people have already thought about in other forums, so it can not be called '' My Idea'') is considered by me as high risk high reward, which some people might be interested in. The idea basically depends on hedging + martingale to secure profits which should increase exponentially, but also risks blowing up the account. I have posted this earlier in another thread for EA requests, but i believe it got buried, that is why i decided to make a new thread for it.
The strategy procedure is as follows:
1- At any price at any pair or TF the EA should open : 1 buy position 0.1 lot, and 1 sell position 0.1 lot at the same price ( lot sizes should be adjustable by EA inputs).
2- We specify a step distance of lets say 50 pips ( the step is also adjustable by EA inputs to optimise performance for each pair).
3- If the price goes up by the specified step , which is in our case is 50 pips, we will have 0.1 buy position with 50$ profits and 0.1 sell position is -50$. ( of course taking into account the spreads, the net worth of both of those position will be the 2X spread in negative)
4- We close the wining buy position at 50 pips profit, then we immediately open another 0.2 buy position and 0.2 sell position at the new price. This means that we have 0.1 sell position at - 50 pips, 0.2 sell position at 0 pips ( spread is there of course) and 0.2 buy position at 0 pips ( spread is there too).
5- If the price goes back down by the same step distance, in our case it is 50 pips, we will have 0.1 sell position at 0 pips, 0.2 sell position at 50 pips ( 100 $) and 0.2 buy position at - 50 pips ( -100 $), we close all trades at this point and repeat steps 1 to 5. Taking into account the wining 0.1 buy position in step 3, our total earnings should be 50 $ - 2X spread for 0.2 lot size positions which we opened in step 4. So far so good.
6- If the price went up by 50 pips ( our step distance) after step 4, we close the wining 0.2 buy position and open another 0.4 buy and 0.4 sell positions at the new price. Now we have accumulated profits of 50+100 = 150 $. And DD is -100 + -100 = -200 $ plus spreads for the new 0.4 buy and sell positions.
7- If price goes down by our step distance of 50 pips, we will have 0.1 sell position at -50 pips ( -50$) , 0.2 sell position at 0 pips ( 0 $, but spread is there), 0.4 sell positions at 50 pips ( 200$) and 0.4 buy position at -50 pips ( -200 $ ). we close all positions at this point then start all over again. Taking into account the previous winnings in the cycle, our total earnings are 150 - 50 = 100 $ - spreads.
8- Long story short, we continue adding hedging positions at double lot size of previous positions every time the step distance goes at the same direction while closing the wining position once new target is reached, and we close all positions once a step distance goes in the opposite direction to the previous target. And start the cycle all over again.
The same logic applies if the price went down not up in the procedure that i have mentioned.
I have minor experience in mql language, but i think that the EA should be programmed based on price movements commands for position opening & closings, not by sending orders, because the opposite orders will not have the same TP or SL levels due to buy on ask and sell at bid. What I am trying to say is that the EA must not send pending trading orders at all. It should open / close positions once the step distance movement is achieved based on the logic above. I am not trying to be picky ( specially for a free service provided by good people), but I am just trying to be as clear as possible to make the idea work as it is.
Hope you guys find this idea interesting and worthwhile the effort to programme it.
Thanks in advance
The strategy procedure is as follows:
1- At any price at any pair or TF the EA should open : 1 buy position 0.1 lot, and 1 sell position 0.1 lot at the same price ( lot sizes should be adjustable by EA inputs).
2- We specify a step distance of lets say 50 pips ( the step is also adjustable by EA inputs to optimise performance for each pair).
3- If the price goes up by the specified step , which is in our case is 50 pips, we will have 0.1 buy position with 50$ profits and 0.1 sell position is -50$. ( of course taking into account the spreads, the net worth of both of those position will be the 2X spread in negative)
4- We close the wining buy position at 50 pips profit, then we immediately open another 0.2 buy position and 0.2 sell position at the new price. This means that we have 0.1 sell position at - 50 pips, 0.2 sell position at 0 pips ( spread is there of course) and 0.2 buy position at 0 pips ( spread is there too).
5- If the price goes back down by the same step distance, in our case it is 50 pips, we will have 0.1 sell position at 0 pips, 0.2 sell position at 50 pips ( 100 $) and 0.2 buy position at - 50 pips ( -100 $), we close all trades at this point and repeat steps 1 to 5. Taking into account the wining 0.1 buy position in step 3, our total earnings should be 50 $ - 2X spread for 0.2 lot size positions which we opened in step 4. So far so good.
6- If the price went up by 50 pips ( our step distance) after step 4, we close the wining 0.2 buy position and open another 0.4 buy and 0.4 sell positions at the new price. Now we have accumulated profits of 50+100 = 150 $. And DD is -100 + -100 = -200 $ plus spreads for the new 0.4 buy and sell positions.
7- If price goes down by our step distance of 50 pips, we will have 0.1 sell position at -50 pips ( -50$) , 0.2 sell position at 0 pips ( 0 $, but spread is there), 0.4 sell positions at 50 pips ( 200$) and 0.4 buy position at -50 pips ( -200 $ ). we close all positions at this point then start all over again. Taking into account the previous winnings in the cycle, our total earnings are 150 - 50 = 100 $ - spreads.
8- Long story short, we continue adding hedging positions at double lot size of previous positions every time the step distance goes at the same direction while closing the wining position once new target is reached, and we close all positions once a step distance goes in the opposite direction to the previous target. And start the cycle all over again.
The same logic applies if the price went down not up in the procedure that i have mentioned.
I have minor experience in mql language, but i think that the EA should be programmed based on price movements commands for position opening & closings, not by sending orders, because the opposite orders will not have the same TP or SL levels due to buy on ask and sell at bid. What I am trying to say is that the EA must not send pending trading orders at all. It should open / close positions once the step distance movement is achieved based on the logic above. I am not trying to be picky ( specially for a free service provided by good people), but I am just trying to be as clear as possible to make the idea work as it is.
Hope you guys find this idea interesting and worthwhile the effort to programme it.
Thanks in advance