calculate nights for swap

 

hi friends

how i can calculate how many nights passed after an order opened?

 
st.khalili:

hi friends

how i can calculate how many nights passed after an order opened?

Hello. You may check this:

   diff=TimeCurrent()-OrderGetInteger(ORDER_TIME_DONE);
   nights=MathFloor(diff/(24*60*60));
 
Also you may check this link: https://www.mql5.com/en/forum/277701
How to get comission and swap easy
How to get comission and swap easy
  • 2018.09.05
  • www.mql5.com
Hello. I made a simple script that prints information about positions and deals...