the money sum of last closed lossing trade (use it as my new take profit)
-
Re: Variable - the money sum of last closed lossing trade (use it as my new take profit)
Welcome all
iam trying to add an option to my ea,
which is " the money sum of last closed losing trade " = New take profit,
i tried @jstap way but it didn't work with me
can you help me ,people ? -
@forexhero podrias probar en vez de money usar pips -
@alan-paredes2 Add a shared link instead of pictures, start with this. check profit last closed if <0 use a pink for each closed trade->modify variable block with loop for profit saving into a variable, put this into a comment so you can see what has happened, create a simple tree buying with a SL & TP.
-
-
@forexhero Looks like it should work. does it? |Create another variable and in value add this code (-1st variable), this will turn the - into a + . The reason I said put this variable into a comment is so you could see the -, if you put both variables in a comment you will see the same numbers, one positive one negetive, use the positive in close block.
-
@jstap
please can you share link
and show that -
@forexhero Why you already have 99% in your link, sttempt and show if not working.
-
@jstap
i dont understand well how to make the additional steps -
@forexhero If you don't get it I will help, I think people need to do for them self, this way when amendments are needed people know what to do.
-
@jstap i mean when i did what you told me
the ea doesnt even run -
maybe the problem in writing (-1st variable),
capital or small letters, or ? -
@forexhero That is the name of your variable, in this case (-LAST_LOSS_MONEY)
-
@jstap said in the money sum of last closed lossing trade (use it as my new take profit):
(-LAST_LOSS_MONEY)
 -
@forexhero Think you need 2 variables not just 1, put them in a comment so you can see what is happening
-
@jstap for that second variable
what would be its value
and what changes i will make on it ? -
@forexhero The 1st variable would be as you had it, the 2nd would be what I put, use second in your close block.
-
@jstap 
like that ? -
@forexhero Think that is backwards, shouldent the code be in 2? As I said put these two variables in a comment so you can see what's happening.
-
@forexhero You need to add this in custom code, doesn't update in variable valus.

-
@jstap
can you edit here
https://fxdreema.com/shared/dytAQAK8c