Profit Math
-
@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..
-
@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 -
@biztet said in Profit Math:
@roar , but mine do have 50pips SL and doesn't close that fast.
Also close based on your formula, not candle close.But your TP is still small, no matter if its reached by a fancy formula.
Look at your backtest report - I'm willing to bet that your average win is many times smaller than average loss. -
@roar Thank you .... I will try and give you feed back
-
This is just a too good to be true Strategy Tester - Control Points result.
I'm sure @roar & @AlphaOmega have a lot of experience like this.
This is just 4 months test, June 2020 to Sept 2020.
Question is, how can i have this good result in the real life?

=========================================================

=========================================================

-
Hi All... I continue here.
I need help to make level sum of profit.
Example:
When equity +$1000, close trade when total group profit reach $30.Equity +1000, close +30
Equity +2000, close +50
Equity +3000, close +70
Equity +5000, close +100...and so on. Tq.
-
@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
-
@AlphaOmega , i believe this is yours?

-
@roar , a little help here please. Hoping to get some block with new formula for the price level. Thanks.
-
@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 -
I wonder where is one of our teachers? ... josecortesllobat I hope you are still good and healhty!
-
@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

-
@alphaomega no, average variable is reseted when block 8 begins its work.
Area #1 is just for getting the total volume of open trades.
The trades variable is useless, I forgot to delete it. -
Hello @roar @AlphaOmega Happy to know that you were working on this and found a solution. Well done!!!
Keep pushing on learning fxDreema and building your projects. -
@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..
-
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

-

That piece of code is placed on the 'OnTrade' tab that is intended to do things with trades. I would say that you have to place 'Position created' block on top what would mean that when a trade is created, some things will happen. As it is right now, I would say that the code does not execute anything.
Give it a try and let us know.
-
@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.

-
@AlphaOmega I have to say again that you must simplify the project as much as you can or we can try to help you step by step to build what you are trying to get from a simple starting point. Maybe this way is not quick but we can get a more understandable project behavior instead of trying to look at your code to see the trouble. I am sure that other forum members are smart enough to find the problem but the way that fxDreema explained to me is as I said above.
Let's get started by doing a simple project. For example, I want that the EA opens a position every new bar after a bull crossover happened on the previous candle. There is no need to share your conditions to trade. After that simple project we will increase the complexity with what you want to obtain. What is important is to avoid adding more than 2 new features on each step of the project to be sure that what we added behaves as expects.
-
@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!