Find orders
-
Ive done above 200 expert advisors to find the answer i seek.
Find orders and save ticket nr and profit value to variable.
If price above open find the highest trade available
If price below open find the lowest trade available
Find the the most profitable trade
Find the least profitable trade
The way i have been showed before is the link below , its to find the trade with the lowest profit available or atlest it should do it , then it uses variables to collect previous closed profits.
When the closed profits > the biggest loosing trades value it closes .Though it was going to work with reversing the parameters for the different things i seached for but i dont know anymoere.
-
I see no launcher there. Is that EA for manually trades only?
-
The whole ea is about 1000 blocks and not easy to see whats up so i only took the part that is used to collect the trade with the biggest loss , or at least it should

-
Wow, that is a hack of an EA! Are you sure the part we see is the only one conditioning what you are asking for? I guess the best solution would be top split up the original project into several parts and check them out all of them separatedly.
-
This is the one im currently working on and it wont make any sence to anyone so will make it more simple for us to discuss what im seeking for .
https://fxdreema.com/shared/zcbar0ead
Here is a simple idea of it
https://fxdreema.com/shared/8hojBM7J
To this i want to collect the trade highest buy trade and the lowest sell trade , to counter trade when price is </> that specific trade it should trade the opposite instead of itselfs direction , to have the highest/lowest trade on your own side.
Hope anything makes sence

And add a closing for when the biggest profitable trade goes against with x % it should allso close and so on . -
@timmyhanke Do you reset the dd variable before using the "for each trade" to find new losses again? I would reset all relevant variables to 0 just before launching the loop, but I'm not sure if it matters here.
Do I fully understand the mechanics you are after: match win trades to lose trades and close all? Do we look at history trades or only running trades? Can you make a numerical example?
A tip: I see a lot of repetition in your full project, I think it would be easier managed if you used some loops here and there. Also, "modify variables" block is actually very rarely needed, you can use the quick "variables" tab on upper right of each block to do almost anything, only indicator calls are easier done with "modify variables"...
-
HI @timmyhanke :
Same thing i was trying to find how close most losing trade / how find most losing trade of sell side or buy side and i think we are on same EA which was given in youtube videos, am i right ? -
@seemab said in Find orders:
HI @timmyhanke :
Same thing i was trying to find how close most losing trade / how find most losing trade of sell side or buy side and i think we are on same EA which was given in youtube videos, am i right ?I havent seen anything to make me think this way , its only logic if you are willing to use a shit ton of trades at once , to make the most of the situation anywere it goes . In a right term , make your ea able to fight for its life nomater what .
-
@roar
The ea is over alot of trying errors , i dont know what to do anymore , i just need it to do the right thing , it collects the biggest loss
if the trade closes it resets the collected amount of closed trades and restart the progress ,Ive got the section of collecting profits already just have it to work to what it needs to do , in the correct manner , and i only collect from the closed trades.
I know that you helped me with this example before , and i thought if we change as money to above dd it would find the biggest profit ?
So it will easily be copied and make another vairable to dd to find the profit .
And basicly if we have the biggest profit / loss of buy / sell we even have the highest / lowest trade available.
And thanks for the tip about reseting the variables , most of my ea is a old filtering method i used but is afraid of deleting , its trails and errors that i just cant remove just yet

-
@timmyhanke find biggest losing trade? Just use the loop block, sort the trades and set n=1? No need for any variable. Just 1 block and done.
I see you have done exactly that, so why dont you like it? What needs to be changed?
-
have to ask n = 1 what do you mean by that ?
and does this work for the biggest trade available ?
https://fxdreema.com/shared/cQ6VMLv8b
Sorry for asking questions but i need vital information right now , im using a strategy aswell in all of this to change from trend to revered trading , using flags , but none seem to understand whats upp . Tried with turning essential blocks of and on instead aswell , but with the amount of orders its hard to tell whats the right upp side right .
Ive been using variables alot more since we spoke , maybe it would help , or is it maybe the sice of the project or the naming of the blocks , that it dosnt keep up at all ? -
@timmyhanke here's how to find the extreme win and loss:
https://fxdreema.com/shared/1nybT8tae -
that was extremely simple and the thing i havent tired , and totally why i ask for help , to find the answear i am looking for .
Will try it out through my different ways of trading and see what it does differently . Thank you for you help yet again !
-
No problem

When we did the similar project years back, that "profitable first" sorting wasn't yet available in fxdreema, I think. -
Once more, roar at the rescue!

-
@roar Please can you tell how check for profit for only the trades which are in profit.
For example :
I have 10 buy trades and my 4 trades are in profit and 6 trades are in loss.
Now i want to check total profit of only these 4 trades and get it in a variable.
Please tell me how i can get this ? And body please have any idea ? -
-
@roar Sorry but this one is not working when i do it and draw value is as text on chart of totalprofit variable it's in 100000's not according too the trades. Please any other idea ?
-
@seemab Works fine for me. Make sure you copy the thing 100%
https://fxdreema.com/shared/lg76MUdsb

-
@roar As in your picture ( the terminal is having profit of 136 dollars ) and 1 trade is in -1 dollar, ( so the profit of the total trades is 136 dollars ) but the comment of chart is showing 137 dollars.
I need only profit of trades which are in profit not all the trades.