EA calculated Lot size is wrong, but settings and signal is correct?

 

I have pine connector EA set up connecting Trading View and MT5 on the 5%ers Prop Firm download of MT5. I have target type set to price, volume type as percentage calculated based on Loss (which is calculated based on risk). My EA should receive a signal with a risk %, a buy/sell command, the symbol, SL's and TP's in price, and a signal ID. The screen shot of the experts tab is shown below confirming this. Unfortunately it calculates the position size as 100 units of gold, which is drastically high. The account is 100,000$, and so 1% risk should be a loss of 1000$ if it hits the SL. In this case the screenshot shows that the risk amount is correct, 1000$, but the position size computed is 100. No clue why this would happen. Any help or insight would be appreciated.

 

Signal? You don't mean a signal from MQ's signal service?

Can you post the code of the function that calculates the volume?

Beside that there are many, many(!) examples of the calculation of the volume: https://www.mql5.com/en/search#!keyword=calculation%20volume

 
Matthieu Durieux:I have pine connector EA set up connecting Trading View and MT5 ...
Discussions, recommendations or suggestions for 3rd party products and services is not allowed on the forum. Please do your own research.