Hi,
thanks, that was kind of easy laugh

However, when trying the following:

for(closed_trades)
if(TradeBarClose == Bar)
printf("\n --- TradePriceOpen: %.2f TradePriceClose: %.2f TradeStopLimit %.2f TradeStopDiff %.2f TradeProfitLimit: %.2f TradeProfit: %.2f",
(var) TradePriceOpen, (var) TradePriceClose, (var) TradeStopLimit, (var) TradeStopDiff, (var) TradeProfitLimit, (var) TradeProfit );

I get the following result:

--- TradePriceOpen: 33.58 TradePriceClose: 31.21 TradeStopLimit 31.22 TradeStopDiff -2.36 TradeProfitLimit: 36.96 TradeProfit: 5.14
--- TradePriceOpen: 30.83 TradePriceClose: 28.52 TradeStopLimit 28.54 TradeStopDiff -2.31 TradeProfitLimit: 33.93 TradeProfit: 2.49
--- TradePriceOpen: 30.62 TradePriceClose: 28.39 TradeStopLimit 28.38 TradeStopDiff -2.25 TradeProfitLimit: 33.67 TradeProfit: 8.00

The TradeProfit looks really strange.
The first trade for example is a loss, but TradeProfit = 5.14
According to the documentation TradeProfit = (TradePriceClose-TradePriceOpen) which isn't true for any of the trades...


/Daniel