trade entry price value in a variable
-
My dear Master
what i need to get is that
a specified value to enter
lets take an example
i open a sell trade ,the open trade price is 33100
i want to put this value in a variable to use it in the next pending orders for sell or for buythat what i need.. a specified level for my pending orders
thanks very much agai
-
@kallosh You can do it this way:

-
@l-andorrà
My great Master,
thanks very much .. i did it , but i dont know why the EA working good for 20 days in backtest
then it is out of order,, it is opening a random deals and repeated deals some times...
i dont know why!!!thanks for support.. and i ll share the EA to see if i made any mistakes in ( for each order ) block parameters
shared/OF1lcS7Mcbest wishes
-
@kallosh said in trade entry price value in a variable:
shared/OF1lcS7Mc
I see you define groups 1 and 2 in blocks ID1 but then you use a variable in both buy/sell now blocks. This means groups 1 and 2 are not really 'created'. You need to specify groups 1 and 2 within those blocks.
-
@l-andorrà
My dear master
i tried a lot of ways to solve the problem
i am so upset
please help
shared/hC1iYvGLthanks
-
@kallosh said in trade entry price value in a variable:
shared/hC1iYvGL
The problem is here:

You defined a group number in the 'No trade' block above this line. However, this variable does not coincide with that number. You should use number 1 or 2 here, not a variable.
-
@l-andorrà
My Master
i change it
and do all options i got about the variables .. i feel i lost
please healp me
this is the second month i waste in this EA and no result
thanks very much -
@kallosh Can you please share the new version?
-
-
@kallosh said in trade entry price value in a variable:
shared/rDC8pgs7c
The problem is that you are asking the loop to search for one only trade all the time whereas the check trades block is searchng for a different number:

That will never happen. You should remove that '1' number from all 'For each trade' blocks.