how to store order information

 

hello guys i need your help

i am recently learning mql4 coding and maybe my problem is easy for you.I appreciate you for helping me

i want to write a trailing stop EA based on risk reward ratio for each order.(orders stop loss are not the same pips)

i know i can store order information like stop loss with OrderSelect() and then OrderStoploss() function

but i want to store the first stop loss of each order before modify

let me say an example:

{my EA opened an order with stop loss like 1.5555 and modifed that stop loss to 1.6666 and then 1.7777.

now i want EA to store 1.5555 as a variable and not change them to 1.6666 and 1.7777}

have you any solution to solve this issue? or any idea to write trailing stop code base on risk reward ratio for each order?

thanks.

 

Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893

  • Usually people who can't code don't receive free help on this forum.
  • If you show your attempts and describe your problem clearly, you will most probably receive an answer from the community. Use the CODE button (Alt-S) when inserting code.
  • To learn MQL4 programming, you can research the many available Articles on the subject, or examples in the Codebase, as well as reference the online Documentation.
  • If you do not want to learn to code, that is not a problem. You can either look at the Codebase if something free already exists, or in the Market for paid products (also sometimes free). However, recommendations or suggestions for Market products are not allowed on the forum, so you will have to do your own research.
  • Finally, you also have the option to hire a programmer in the Freelance section.
 
Attention: MT4 and MQL4 is nearing its end of life. Consider moving over to MT5/MQL5 instead.
MT4 End Of Life - End of active support for MT4 with no active support and updates; "What the future holds formt4 and the vast array of
MT4 End Of Life - End of active support for MT4 with no active support and updates; "What the future holds formt4 and the vast array of
  • 2023.09.19
  • www.mql5.com
I have heard reports that mt4 is soon to become 'end of life' with no active support or updates. Can anyone explain what the future holds for mt4 and the vast array of millions of ex4 indicators, scripts and ea's. Com/ru/forum/447913/page6#comment_47273082
 
Fernando Carreiro #:

Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893

  • Usually people who can't code don't receive free help on this forum.
  • If you show your attempts and describe your problem clearly, you will most probably receive an answer from the community. Use the CODE button (Alt-S) when inserting code.
  • To learn MQL4 programming, you can research the many available Articles on the subject, or examples in the Codebase, as well as reference the online Documentation.
  • If you do not want to learn to code, that is not a problem. You can either look at the Codebase if something free already exists, or in the Market for paid products (also sometimes free). However, recommendations or suggestions for Market products are not allowed on the forum, so you will have to do your own research.
  • Finally, you also have the option to hire a programmer in the Freelance section.
thanks
Reason: