gaheitman wrote:There is still an issue with the EA calculating lots based on one stop loss, but using another when actually sending the trade. I didn't see why that would be the case, perhaps Paul will be able to set us straight.garyfritz wrote:Yup, looks like you're right, George. useATRStopLoss is on by default, and it overrides the normal Entry - Stoploss definition of "risk." I missed that.gaheitman wrote:I have walked through the code to calculate the lot size for the AUDJPY trade, and it calculated the correct lot size of 6.13, which would have been correct for a 10 pip SL. The lot size that was used seems to be based on the UseATRStopLoss setting. Do you have that on?
Might be more reasonable, though. Entry-Stoploss can be very small and give outsized position sizes.
George
Yeah, I've notice that. the stop is calculated as many as 3 times before a trade is opened
1) in calculatelotsize
2) in lookfortradingopportunities
3) in sendsingletrade
it is also calculated again in processOpenTrades.
It all needs to be rationalised a bit.
