I would like to write a script which will send to me the details about my trading account. The main goal is to see the balance/margin etc but I would like to see the the list of the oponed orders. The question is how can I put all the information of the opened orders(opened price, open time,profit, swap) in one email. The first idea was to use a for loop inside of the sendmail function, but it didnt't wordked. Does anibody have any idea how could I solve this probelem?
tanks in advance,
SHOW us your code.
It's pretty simple.
Did you enable email in your terminal options?
That's kind of important too. :)
Of course, I only dont know how to write the script exactly. The beginnig is like this:
SendMail("Daily account report:"+account+", "+date, //Subject "Account information("+account+"):"+"\n"+"\n"+ //Message "Account Currency: "+ccy+"\n"+ "Equity: "+equity+"\n"+ "Balance: "+balance+"\n"+ "Margin: "+margin+"\n"+ "Free Margin: "+freemargin+"\n"
but I do not have any idea how could I put a for loop to put into the sendmail function, which would write me the details of the orders. Because if I have 1 opened order, then I have to write once the information, if I have 4 then four times.
Please use the SRC button when inserting code for display in the forums. Please include a complete copy of the code in question for reference, not just a portion of the code as it is incomplete.
but I do not have any idea how could I put a for loop to put into the sendmail function, which would write me the details of the orders.
Because if I have 1 opened order, then I have to write once the information, if I have 4 then four times.
See the following reference pages.
Your questions are easily answered by looking at the available reference materials.