HOW I CAN MODIFY SOME OPTION WHEN SLIPPAGE CHANGE ?
-
HELLO
IF I WANT CHANGE SOME OPTION IN MY EA WHEN SLIPPAGE CHANGE
LIKE IF I WANT CHANGE LOTS OR TAKE PROFITS etc
HOW I CAN DO THAT ? WHERE I CAN CONTROL ABOUT SLIPPAGE ?
THANK YOU -
Do you mean changing lot size and profit after or before a trade is open? In any case, slippage is unpredictable. The best you can do is reacting to it at the precise moment your trade is/will be open/modified. I don't tjink anyone can 'control' slippage.
-
@l-andorrà
this example / i want after open trade by slippage 1 pips then change take profits from 1 pips to 2 pips
how i can know what slippage happen when this trade open ?
i see slippage only in this condition - like image

-
@moon said in HOW I CAN MODIFY SOME OPTION WHEN SLIPPAGE CHANGE ?:
@l-andorrà
this example / i want after open trade by slippage 1 pips then change take profits from 1 pips to 2 pips
how i can know what slippage happen when this trade open ?
i see slippage only in this condition - like image

That is a good question? I have no idea. Does someone els know it? That I want to know too.
-
@moon Are you working with pending orders or with Buy/Sell now blocks? If you have a pending order, you might set the order price by yourself and store it in a variable. Once the order is opened, you mihjt take the open price and calculate the slipage (positive or negative).
With the Buy/Sell now block you might store the actual market price (bid/ask depending on direction) in a variable and after the Buy/Sell now block calculate the difference.
-
@trader-philipps said in HOW I CAN MODIFY SOME OPTION WHEN SLIPPAGE CHANGE ?:
With the Buy/Sell now block you might store the actual market price (bid/ask depending on direction) in a variable and after the Buy/Sell now block calculate the difference.
I don't fully understand that part. It's a market execution so the trade will be open at the current available price. How can you know the 'order' trade?
-
@trader-philipps can you show me your idea by project share it here ?
-
@moon Something like this ..

-
@trader-philipps i will try it and see
thank you -
@trader-philipps can you give me your idea project if i use pending buy or sell ?
-
@trader-philipps and other ask
-
@moon said in HOW I CAN MODIFY SOME OPTION WHEN SLIPPAGE CHANGE ?:
@trader-philipps can you give me your idea project if i use pending buy or sell ?
Well, that is a bit more tricky as the creation of the order and the opening of the trade are not followed after each other. Hence you need to store the price you placed in your pending order somewhere. I you have just 1 trade at a time you might keep this price stored in a variable. If you dela with more than 1 pending order you need to have a link between the stored price (how and wherever) and the the order itself.
The only direct way I see wpuld be storing your order price in the comment. That's not very smart, but you have a direct relation to the order.