Correct stop loss and take profit in MQL4?

Correct stop loss and take profit in MQL4?

Manage alerts

Loading saved threads...

SSP · External communityPost link
External question — Stack Overflow Stack Exchange Author: SSP Original post: https://stackoverflow.com/questions/72417663 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I'm newbie in mql4 . Suppose I buy a currency pair in price of 1000. TP is 1500 and SL is 800. What I want is: When prices goes up to 1300, I change SL to 1200 . In other words, when price reaches to 1300, it closes when price goes down to 1200 or goes up to 1500 . How can I code this? My code for now looks like this: int tiketbuy=OrderSend(Symbol(),OP_BUY, Lot,Ask, Slippage, Ask-Distance,Ask+(2.5*Distance),NULL,1111,0);
Quote
Report
Forexipy · External communityPost link
External answer — Stack Overflow Stack Exchange Author: Forexipy Original post: https://stackoverflow.com/a/72657615 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. You need to use OrderModify function
Quote
Report

Post Reply

Checking account access…
Correct stop loss and take profit in MQL4? | Forex.com.bd