@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..
Posts made by AlphaOmega
-
RE: Profit Mathposted in Questions & Answers
-
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.
-
RE: Awesome Oscillatorposted in Questions & Answers
@ramimoujaes Do the backtest now and see if it is what your intended strategy should be .. then if need changes .. do it... if you get stuck post a question
-
RE: Lot size decreaseposted in Questions & Answers
@ramimoujaes My friend you should ask @roar, he is the magician with variables... if it is not to difficult there is other members that can help you... I am also like you, at the start of my learning journey...
-
RE: Awesome Oscillatorposted in Questions & Answers
@ramimoujaes This is how you put the blocks for a start.... Make sure your indicator buffers is set to Buy and Sell
https://fxdreema.com/shared/ZR1qrMiD -
RE: Move Take Profit to modify as a groupposted in Questions & Answers
I think this is the tread Hadees was talking about
https://fxdreema.com/forum/topic/6979/quick-question-for-miro1360 -
RE: Move Take Profit to modify as a groupposted in Questions & Answers
@ambrogio Here is some clues: I am just not able to understand anything... That profitloss variable needs another input called "profit" but I cannot find that post anymore to give you
https://fxdreema.com/forum/topic/4438/how-can-i-put-take-profit-as-level-price/6


I have an expert source code that do this TP modified as a group. I was wondering how to put that code into a MQL block and then add it as a condition... But I do not know how to do it. Would you be able to help?I still think the answer lies with josecortesllobat and roar but they are busy these days
https://fxdreema.com/shared/xblYjK0uc -
RE: Move Take Profit to modify as a groupposted in Questions & Answers
Could any of the senior members help me with this problem please? Have been struggling with this for weeks and there is no answers that I can understand in the search ...
Thank you in advance -
RE: Move Take Profit to modify as a groupposted in Questions & Answers
L'andorra I think you are talking about the Profit math subject., but that I could not make it work. It is way to high for me to even try to modify that calculations... and I really tried, but as soon as you change something in that setup .. everything when wrong..
https://fxdreema.com/shared/xblYjK0ucIs there anybody that can help me with this Take Profit modify:

-
RE: Move Take Profit to modify as a groupposted in Questions & Answers
@l-andorrĂ ok ... thanks bro.. I will try and search it