Forum

Finding total number of orders closed today....for an EA. Datetime difficulties

I have code within my EAs that shows on the chart, the total open and closed orders for that EA and magic number. I have been trying to modify it to only show closed orders for the current day. I have read and re-read the section describing the datetime function for MT4, but cannot work out how to

Price differences between Market Watch and Chart

My broker has just informed its clients that as of Monday: "MT4 charts will show aggregated prices of Bank, Non-Bank, and ECN liquidity on all FX from Monday's market open. It is important to note that all orders will be triggered based on the published Bid/Ask price visible in your Market Watch and

Finding what type of order was last opened.......a difficulty.

Hi, I'm trying to code to find whether the last order was a buy or a sell. Seems simple. My typical code would be: datetime LastOpenTime; int LastOrderTyp; double LastOrder() // To find

Color of closed trade lines - can they be changed from red/blue to something else?

Seems like every other color of line can be changed, even the arrow color as part of OrderSend and OrderClose, but not the dotted line that joins the arrows after an EA has closed a trade. Anyone know if both the color of the line can be changed and the line style

How to number open trades on chart

I'm trying to place a number next to all the open trades on a chart. I've managed to do an EA that does this, but it fails to correct the numbering when an order is closed. The last number on chart seems to be get all screwed up. I can't figure out a way to do this. Any ideas/corrections

How to mark with arrow, all Open Orders on a chart, at the open of the bar and not at OrderOpenPrice?

I'm trying to show on a chart, an arrow for each open trade. However, I want it to appear at the open of the bar it occurred, and not at the actual OrderOpenPrice. I have a script (attached) that puts an arrow and price box at the OrderOpenTime (great), but puts it at the OrderOpenPrice. I want it