Morning Everyone! I want to limit the parent order in a variable. I have placed a condition to reset the counter on the "on trade" tab, it works fine but if the price action moves back pass the previously reset point, the parent condition gets triggered again which cause it to create about 20 orders simultaneously. How can I control this situation? Thank you in advance!
Posts made by AlphaOmega
-
How to limit the Parent ordersposted in Questions & Answers
-
RE: Profit Mathposted in Questions & Answers
@biztet Lots more work to be done here.. But josecortesllobat has done a great job of putting me on the right track.. If only I really understand this variables and constants. Will let you know when I am finished... look whats it doing firing on only 1 out of 8 cylinders so far


-
RE: Profit Mathposted in Questions & Answers
@josecortesllobat Wow!! I really appreciate the time and effort you took to make this example. Also thank you for your patience as, I am sure other members here also have problems with this variables and constants as the Fxdreema example do not really teach you anything so in fact you are helping the whole Fxdreema community..., So a big THANK YOU and lots of respect to you from my side!
I will go through your stuff and give you feedback on my progress. -
RE: Profit Mathposted in Questions & Answers
@josecortesllobat .. I do not really know how to put your code into constants and variables.. Never worked with those stuff and same goes to coding. After lots of back reading I have come up with something but it is not working, and I am afraid I think I am going down the wrong road here
.. Please take a look and teach me how to implement what you wrote previously.. greatly appreciated
https://fxdreema.com/shared/163e9qHvb

Hi @AlphaOmegaRegarding to your question: TP average. Probably there is a much efficient way to code it because fxDreema allows to reach the same goal with multiple ways. I assume that each child trade has a fixed TP that probably will be the same as for the parent trade. Let´s call it 'TakeProfitPips'. Using your example,
nTrades == 0 (reset it as per your need)
TakeProfitPips == 100OpenPrice_ParentTrade == 1.00000
nTrades == 1TPLevel_ParentTrade == OpenPrice_ParentTrade + TakeProfitPips (as price fraction) = 1.00000 + 0.00100 = 1.00100
OpenPrice_ChildTrade1 == 1.00010
nTrades == 2TPLevel_ChildTrade1 == OpenPrice_ChildTrade1 + TakeProfitPips (as price fraction) = 1.00010 + 0.00100 = 1.00110
TakeProfitAv == (TakeProfitPips + (TPLevel_ChildTrade1 - OpenPrice_ParentTrade) "as pips")) / nTrades
= (100 + (1.00110 - 1.00000) "as pips" ) / 2
= (100 + 110) / 2 = 210 / 2 = 105Modify ChildTrade1 TP to 105 pips -> TP_ChildTrade == 105
OpenPrice_ChildTrade2 == 1.00020
nTrades == 3TPLevel_ChildTrade3 == OpenPrice_ChildTrade3 + TakeProfitPips (as price fraction) = 1.00020 + 0.00100 = 1.00120
TakeProfitAv == (TakeProfitPips + [(TP_ChildTrade ) + (TPLevel_ChildTrade2 - OpenPrice_ParentTrade) "as pips"]) / nTrades
= (100 + [(105) + (1.000120 - 1.00000) "as pips" ] )/ 3
= (100 + [(105) + (120)] )/ 3 = 325 / 3 = 108.3Modify ChildTrade2 TP to 108 pips -> TP_ChildTrade == 108
.... and so on
-
RE: Profit Mathposted in Questions & Answers
@biztet Hahaha!! Oh man... have not been there since Tanaka left.. maybe I should go make a peep... Yes .... and THANK YOU!!! To all the senior members who helped in this post!!! Respect to you!!
-
RE: Profit Mathposted in Questions & Answers
@biztet We are contributors of cause. I just have nothing to contribute at the moment.. lol
-
RE: Profit Mathposted in Questions & Answers
@josecortesllobat .. Wow!! thank you so much for your reply... I will firstly try to understand what you have written because I have no coding skills as such and also secondly have never work with this variables/constants... Much appreciate that you took the time and trouble to help me here... Thank you!
-
RE: Profit Mathposted in Questions & Answers
Yes... It is similar bur there is also a twist in the money management because martin only can be dangerous... So i am hoping on someone to help me with this... The senior members has the answer.... Please consider helping here guys because I have no clue how to go about this.... Thank you in advance!
-
RE: Profit Mathposted in Questions & Answers
@josecortesllobat Could you help me also with my TP average please? I want to code so that each child trade that is placed, make the take profit go to the average of of all trades running. This is what roar suggested but I can not get it to work correctly and also is based on random lot sizes, which it should not be.
0_1598185891976_AO - Test Average TP.mq5
The following picture is how I want it to work

I would really appreciate your help .. Thank you in advance!!
-
RE: Awesome Oscillatorposted in Questions & Answers
@line I think he wants you to built the expert complete
-
RE: Regarding the Indicator Rise and Indicator Fallposted in Questions & Answers
@len-1 You will have to search at MQL5 for a suitable indicator and use the buffers... Too try and code what you want you need actual coding experience and only real coders, Roar, Trader Phillips, Miro1360 will be able to help you with what you want..
-
How to move the TP when open orders move in negativeposted in Questions & Answers
Hi Guys..
Could someone please look at my problem and give advice. If I have several trades opened in negative, I would like the TP to move to the average TP of all opened sell orders or vica versa buy orders. Roar gave me a friendly hand and create the following blocks but he did not have time to test it, but there is problems..
Firstly, The TP does not move
Secondly, the code is based on random lots which I do not want
https://fxdreema.com/shared/ucZlZvYcc
Any help would be greatly appreciated as this problem is way beyond me
Thank you in advance!
-
RE: Losing my mind trying to get trailing stop to work! :)posted in Questions & Answers
@sirboyce You are one of the cleverest people here... we want advice from you man!! I think your If trade block is wrong for Trailing stop block... Should the trailing stop block not be as part of your strategy not a separate entity?
-
RE: HOW OPEN BUY OR SELL MORE THAN ONE?posted in Questions & Answers
@josecortesllobat You should have been a university teacher seriously.... You explain everything so clearly and precise that even me that has nothing to do with project can understand exactly what you teach... My respect and appreciation to you.. Thank you
-
RE: Basic Trailing Stop Questionposted in Questions & Answers
@ambrogio Sorry Ambrogio to trouble you again... Could you please help and explain how this constants and variables is suppose to work.. This formula still is not following the average of all trades with the TP. I am to slow to understand it .. Please brother
https://fxdreema.com/shared/fdxeERxqc -
RE: Basic Trailing Stop Questionposted in Questions & Answers
@ambrogio Thank you.. Thank you brother!!! Yes this is exactly what I also want to do!!! Grateful to you



