Sorry bro ... cannot help you .. I am using MT5
Posts made by AlphaOmega
-
RE: Tutorial 07 - Read prices from indicator objectsposted in Tutorials by Users
-
RE: Tutorial 07 - Read prices from indicator objectsposted in Tutorials by Users
@umbrellamaker All the source coded products is in this post brother? Just go backwards and look for it.... easy as pie
-
RE: Profit Mathposted in Questions & Answers
@josecortesllobat Thanks for the reply... Yes, you have a good memory... I will start from beginning:
When indicator is in overbought or oversold I want to place order.. check simple expert example:
https://fxdreema.com/shared/mdjTWpegb
This is the indicator: 0_1606327536570_Stochastic MACD.mq5The next step,
If the conditions is met but price action still moves further away from 1st trade(parent) in a negative direction: another order must be taken -30 pips(first child trade) away from original entry and then -30pips away from 1st child trade, etc..... and the lot sizes must be exponentially added on an averaging basis of a +/-150% of previous negative lot size, on every new child order. For example: 0.01(parent), 0.02(1st child), 0.03(2nd child) etc, and the take profit must modify 25% above the average of all trades
I hope you can understand this explanation.
Thank you in advance -
RE: Profit Mathposted in Questions & Answers
@josecortesllobat... Hallo Jose .. Thank you for taking the time to reply..
Ok, This is what I want to basically achieve:
I want to create an averaging expert where I can set the take profit on % above the average of all trades opened:
Example:
This is how I started with the algorithm from roar: https://fxdreema.com/shared/VeKz6Pg7d

But this was a problem because it has a random lot size which Roar used for testing and I cannot use it.. So I changed it to fixed value


I then started to take profit on object on chart but this also is a problem because the horizontal line must first modify to an average before the expert will input a TP

So now I am stuck! So please suggest a starting place where I can understand each step with your help
greatly appreciated! -
RE: Profit Mathposted in Questions & Answers
@josecortesllobat .. Thank you for replying.. I have tried that but no difference? If that purple line do not move it will not put the average TP. I think it has something to do with the Buy TP block. I have put a constant TP but that also does not work.

Please explain the workings of the expert Jose.

-
RE: I'm trying to creat a simple trade manage EAposted in General Discussions
@rubvil Cannot help you if you do not share the indicator, but it would go something like this. Insert buffer for buy

-
RE: Profit Mathposted in Questions & Answers
Could you please explain how to rectify this problem: The expert takes 2 orders from the word go but with no TP. As soon as the Average horizontal line move the TP average appear. I still do not grasp the variables and constant settings, after numerous reading up on it... I want the TP set even if there is only one order. will much appreciate the help... Thank you
https://fxdreema.com/shared/HcVkjCWVc

-
RE: Martingale or Grid EA - Helpposted in Questions & Answers
This is a real great contribution to the Fxdreema noobs... Now we can all understand how this martingale works... Ons kan nou almal in ons eie taal beskryf wat ons nie verstaan nie en magies sal dit in die taal verander wat ons verstaan, wanneer ons dit lees. Great idea!
-
RE: Profit Mathposted in Questions & Answers
@josecortesllobat Hi my friend... Welcome back!!! Look roar is a Magician with that codes but you have the patience to teach... I have a few problems with my expert which I will forward to you as soon as I come of work... just wanted to say Hello..
-
RE: Profit Mathposted in Questions & Answers
@roar Hi roar.. I want to know if the below picture should have the "average" variable inside? It does not make a difference in the algorithm .. just wondering about it... Thank you
@alphaomega I noticed a bug in my algo. Weird thing is, I remember fixing that bug before - maybe I shared you the wrong version...
This should work:
https://fxdreema.com/shared/VeKz6Pg7d

-
RE: Profit Mathposted in Questions & Answers
I wonder where is one of our teachers? ... josecortesllobat I hope you are still good and healhty!
-
RE: Profit Mathposted in Questions & Answers
@roar You did an amazing job here!!..
After a month of struggling with this algorithm (https://fxdreema.com/shared/ij7Qn3Mfd)... I finally got this expert to work with this new algo of yours (https://fxdreema.com/shared/VeKz6Pg7d)... You are a Top Ten of the charts magician with this stuff! Thank you very much -
RE: Profit Mathposted in Questions & Answers
@biztet Oh please... I know less than you about this! I feel I have been given a Ferrari and a drum with a million keys to the ferrari....The only way I get forward is by trying each key.. Lol
-
RE: Profit Mathposted in Questions & Answers
@roar Thank you .... I will try and give you feed back
-
RE: Profit Mathposted in Questions & Answers
@roar Thanks for taking the time to reply.. I am not using the buy/sell counter.. its is off. I wanted to try something else which also did not work..
-
RE: Profit Mathposted in Questions & Answers
@roar Hallo .. thanks for the reply... I cannot get the formula to work out the negative profit average... @josecortesllobat gave me a start.. and this is where I am at:
https://fxdreema.com/shared/pMEhJRUCc
Please give some insight... This was your original code: https://fxdreema.com/shared/ucZlZvYcc
I want the average profit on all trades to modify the take profit.. I know it is a lot to ask but I have tried million of ways and are totally stuck.. Please give me your help.
Ps ... The average price is include the negative trades. so I add volume against the price and then the average TP must modify.. I am struggling with this because the formula does not work correctly.. this is my latest work: https://fxdreema.com/shared/dMHPN08wd -
RE: Profit Mathposted in Questions & Answers
Just a head-up on my very slow progress.. This is just the Buy side.. I have come to the realization that the counter 'ntrades' is not working properly with this negative strategy. The reason is that the comment counter and the 'ntrades' counter do not match the true trades count, therefor @roar 'avg formula blocks' is not working, which leads to the 'takeprofitav' not working, so no take profit's gets modified. I did manage to get a work around by the 'profit unrealized block' but it is not what I intended in my original strategy.. so profit gets wasted.
Comments counter false counter:

Here is the real Back test trades true counter:

-
RE: Profit Mathposted in Questions & Answers
Hi guys .. Need some help here again please: I get strange modification of the take profit. I have tested this like a million different ways but cannot get to a solution. Could you point me in the right direction please?

https://fxdreema.com/shared/vGpLDdrPd -
RE: Profit Mathposted in Questions & Answers
I could not reply your questions totally as Fxdreema was off-line.
This is my latest creation according to your advice: https://fxdreema.com/shared/wxUczDLRd
My biggest problem is that this expert is so fertile with orders, it is hard to control the orders to one at negative intervals of -40pips. Fore some reason the expert start with vigor and then it runs out of steam creating no orders at all? -
RE: Profit Mathposted in Questions & Answers
@josecortesllobat Sorry, for some reason I did not get a flag that you responded? Thanks for helping. This is how far I have come with my truly low knowledge of coding and mainly your help. The forum and @roar contributed a lot, for which I am very grateful!
https://fxdreema.com/shared/pMEhJRUCc
This is what I want to achieve as the base of my averaging expert mainly:I apologize in front for my poor English as I am dutch, so maybe things will come out skew, but here goes,
In a BUY situation....The negative profit average (and future positive Stop loss average) will create some area to imprison the current price action.
So, a parent trade(0.01) gets triggered with its own TP, say 30 pips. Obviously, if the current price action moves in positive you get +30pips. When the price action moves in negative of the current buy order (say -40 pips away from current open price) a child trade(0.02) gets created with a TP of 30pips. When the child1 trade, is created the TP of the parent trade move to the negative profit average of the parent and child1 trade, +25% positive on the average profit line. It means the following:
((parent = -40pips(realized)) + (child1 = +30pips(unrealized)))/2(current trades) = new take profit will be -5pips + (25% positive on Profit Average line) of the 2 running trades.
If the price action moves further into negative, so it will continue:
((parent = -80pips(realized)) + (child1 = -40pips(realized))) + (child2 = +30pips(unrealized)))/3
(current trades) = New take profit will be -10pips + (25% positive on the Average Profit line)
and so forth
If the Take Profit in sequence gets hit all existing Buy trades must be closed as well.(Option to trail the last child trade, if hit then a new child trade must replace, with the same lot size to the taken one.)
Average Stop loss action:
If we have the parent and child trades positioned as mentioned above, The Stop loss Average of the open trades will be triggered to -30pips below the price action, when the new Take profit gets modified. The stop loss will not be fixed and move in parallel with the current price action. This movement of the Stop loss will continue till the current price action moves into positive price action and then the Stop loss will stay static, -10pips below current price action, in positive of our running trades. This will create and area between the modified take profit line and the -10pips Stop loss line with the price action imprisoned in between. If the price action moves further into profit the Stop loss line will trail by 5pips and the Take profit line will move +5pips. This criteria will be ongoing till either the price action hits the trailing Stop loss or the Take profit line.I hope I made sense enough for you to understand me clearly.... Thanks in advance for all your contribution thus far.