Basket Profit based on total pip value
-
I would like to be able to calculate a total running profit or loss in pips (not dollars)
So in short for all buy orders I want to know the total of profit/loss in pips, so I can then close all orders when a certain level is reachedAnother question is I would alos like to be able to determine the total of all open buylots and selllots
thanks
-
If you don't want to use the actual value, then I can suggest this block called "Check current unrealized profit" and then "Close trades"
-
__If you don't want to use the actual value, then I can suggest this block called "Check current unrealized profit" and then "Close trades"[/quote:1o93mayy]
I was wondering if you woulf be so kind as to add equity % on it, I cannot find it still.
I found the formula somewhere on the forum -AccountBalance()*5/100 but, how do I put that on the constant input tab so I can choose how much equity I will use.
thanks
-
Thanks ! I missed that one
if you want equity value I guess you could just create a variables double Equitypercentage = 50%
and then calculate the value and input this in the field "profit amount"maybe fxdreema could confirm that this would work?
-
50% is not a valid value
50 or 2 or 0.5 are valid, but 50% is not a numeric value -
__Thanks ! I missed that one
if you want equity value I guess you could just create a variables double Equitypercentage = 50%
and then calculate the value and input this in the field "profit amount"maybe fxdreema could confirm that this would work?[/quote:l1mzcsjp]
Would you be so kind to give me the clear explanation about it ( or maybe fx dreema canhelp me out), I've tried myself but it didn't work out. I am not good at coding...
thanks for your concern
-
in "Adjust" a value like +50% should work only because % is transformed to /100 by fxDreema while generating the output file. Otherwise 50% or 50/100 can't be used as a value for variables, because variables are defined before the EA even start to work.