Closing an order always with a positive value.
-
Hello all,
I'm trying to always close orders with positive values but for some reason I don't know the EA is not adding up fees and commissions and closes orders with negative values.
Does anyone have any tips on how to order the EA to close any order whenever the sum total value is positive?I have already tested the For each position block with the rule in the condition for Profit+swap and commissions.
I have already tested the bucket of positions with sum profit.
None of this is working properly. -
@ontradingx
I already tried with these 3 conditions.
https://fxdreema.com/shared/HntxOBXRc
But for some reason I realize that maybe Swap or commissions are not being calculated and some order ends up ending up in the total sum negatively.
I just want my EA to check every order, regardless of which pair is open, when the order total sum including Swap, commissions or any other fee, when it reaches a positive $3 will close the order immediately.
That is, the EA cannot admit that any order is negatively closed. -
@OntradingX have you tried other broker? Or if there is any broker that doesn't have swap@commission. Because you close in dollar, not pips. I think there should be no problem.
-
@biztet I have tried from other brokers and the same problem persists, but I believe that maybe this is an Fxdreema problem that should be solved, the correct thing is to automatically calculate all the fees.
For those who want to work without stop loss, this is a huge risk as the intention is never to close any negative order. -
@ontradingx You need to select the fisrts structure to get that. Forget the other 2. However, biztet is rught. Your broker's conditions will still prevail no matter what.
-
@l-andorrà I also agree that the first option is ideal, but the (correct) is the tool to calculate alone regardless of the broker dictating the rules, we already know that most brokers are fraudulent about not benefiting us, so the EA has to strictly follow the rule imposed on him.
-
@l-andorrà @biztet
I'm testing a second option that would be as follows:
I monitor the gain for when it hits $3 then the trailling stop guarantees me $2.50 and walks every step.
I don't know if I'm doing the right thing, but at least I realized that this allowed me to no longer have negative closed orders.
I will test other methods.
-
@ontradingx You should use the same trailing stop and trailing step initially. Then backtest it and readjust it later if necessary.
-
@l-andorrà can you give me an example?
I didn't understand what you meant -
@fxdreema
Could you help us to solve this problem?
To understand what I'm saying, create a basic EA with multiple pairs and order it to end trading only at profit, neither can be a loss. -
@ontradingx Sorry. I didin't notice money cannot be selected as an option for the trailing step. This means you should use a whole structure for that purpose and not the trailing stop block. Do you have any alternative for it?
-
@l-andorrà
I do, well, at least for the backtest it's working, I'm going to test it in the real market to validate it.
what is your opinion about this solution? -
@ontradingx It is not a bad one, but that block doesn't include swaps and comissions. Depending on the value required it can work.