Forum

Request for new Feature in MetaTrader: Control class for Strategy Tester

I submit there is a need for a class that can control the Strategy Tester from within EAs. This would be exceptionally handy when needing to control the speed of the testing, pausing, and or stopping the Tester altogether. Right now I'm using a pretty rudimentary method of calling keyboard events to

Keep getting requoted when using PositionClose() and PositionClosePartial()

I'm writing a hedging EA, and in a section I try to close multiple open positions once I've hit a specific profit target. The logic loops through all positions, checks if it is the correct ENUM_POSITION_TYPE , and executes the PositionClose() function with the matching position's ticket number. For

CMoneyFixedRisk keeps returning 0.0 as volume

I am trying to find a way to calculate the appropriate volume for longs and shorts dependent on a fixed percentage of risk. I stumbled across the CMoneyFixedRisk money management class and set it up in my EA. Every time it is called it seems to always return the value 0.0. Below is an example of how