Break even line on mutiple trades
-
Hi I see there has been som previous question of this topic but I didn't manage to fine a clear solution.
What I want is to draw a break even line on my chart when I have several trades, both buys an sells with different lot.
I only find the average open as an option but that is not the same as break even with different lots.
Does anyone have the break even formula as an written formula so maybe I can puzzle with my brain a a start?
And of course it would be nice to have this in a block. -
0_1515969165308_miro1360_GravityBE_1.0.mq4
not sure if this helps you, I created it in past and now I dont remember exactly how it is working, but you can find it in code
... it is probably not working in tester because it calculates in on Timer function ... -
Thank again miro, i will study it
You are great -
@peringvar my ea uses for that the block "Trailing Stop (groupe of trades) or you can check bukkets of trades.
-
@dieter I have tried to fiddle around with bucket of trades but havent find a solution yet. So far I can se the average open
-
@peringvar With several trades I like to work with the following block. You can hire him for buy and sell trades at the same time. look in the information.


-
Yes I see. My problem is to calculate breakeven before it happens with diiferent lot size and combinations of sell and buys.
-
Hi Miro thanks for this little gem of an indicator. I am trying to integrate it into my project and have added to my indicators. I am trying to test this in the tester with my project but cant get the line to show. Will it not show because it works on timer function like you have said above or by importing it to my indicators should it work ?

-
It was long ago
... Do not import it into My Indicators. Place it on the chart as indicator together with EA, it should plot the line automatically and you can read the line with EA (I do not remember its name but you can find it by listing chart objects). -
you can easily avoid onTimer function,
this is without onTimer (not tested
)0_1547316058979_miro1360_GravityBE_1.0_noTimer.mq4
edit: seems be not working in tester
