Forum

Write logging data to text file?

So I have created my EA and am running it now as paper trading. In order to understand how it behaves does it contain various Alert() statements in the code. This helps me to understand when it detects certain signal changes, when it takes trades, print error messages (if any), how the account

How to use PositionGetDouble(POSITION_VOLUME) correctly?

My EA places multiple trades in a row, thus adding to an open position. Let's take an example: First trade: open a sell position of 0.01 lot EURUSD Second trade, some time later: open a sell position of 0.01 lot EURUSD Third position, some time after the second trade: open a sell position of 0.02

EA gets restarted when timeframe changes

I have coded my first EA and am now running it on a demo account . While doing this I noticed an effect which is undesired: I have a chart opened (e.g. EURUSD, H1) and have started the EA on this chart. Autotrading is enabled and the EA seems to be doing what it is supposed to be doing. In order to