Batuhan:
Let's say that we modified the stop loss of an order with OrderModify() and then we closed our computer.
How can we get the original first stop loss of the order after opening the computer next day?
Is it possible in MQL 4?
Thanks.
its possible simple
//+------------------------------------------------------------------+ //| StopSakla.mq4 | //| Copyright 2018, MetaQuotes Software Corp. | //| https://www.haskayabilgi.com| //+------------------------------------------------------------------+ #property copyright "Copyright 2018, HaskayaFX Corp." #property link "https://www.haskayabilgi.com" #property version "1.00" #property strict //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- create timer double StopDeger=0; int total=OrdersTotal(); for (int i = 0; i < total; i++) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break; StopDeger=GlobalVariableGet("OrderTicket"+OrderTicket()); Print("OrderTicket: "+OrderTicket()+ " Stop Value: "+StopDeger); } //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { int total=OrdersTotal(); for (int i = 0; i < total; i++) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break; GlobalVariableSet("OrderTicket"+OrderTicket(),OrderStopLoss()); } } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- } //+------------------------------------------------------------------+ //| Timer function | //+------------------------------------------------------------------+ void OnTimer() { //--- } //+------------------------------------------------------------------+
or
bool TerminalClose( |
Thanks a lot guys for your helps.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Let's say that we modified the stop loss of an order with OrderModify() and then we closed our computer.
How can we get the original first stop loss of the order after opening the computer next day?
Is it possible in MQL 4?
Thanks.