i made an EA that one of functions is trailing stop.
when i work with fix lot size 0.01, every thing is ok.
but when i use floating lot size according equity, i get error
130 for sendorder() and modifyorder()!
my STOPLEVEL in 0.01Lot and 0.1Lot is 50 and Point is 0.01.
in this order:
CFD: Gold - Order: Buy - OpenPrice: 1525.78 - PriceNow: 1526.3 - LotSize: 0.01
i can change stoploss to OpenPrice.
but in this order:
CFD: Gold - Order: Buy - OpenPrice: 1525.78 - PriceNow: 1526.3 - LotSize: 0.1
i can't change stoploss to OpenPrice.
why this problem is exist?
We can't see your broken code — we can only guess:
Thank you for reply.
i found my problem!
i made a mistake in calculate profit!
i calculated profit according 0.01lot fix and change stoploss according floating lot size like 0.1 lot!
now i calculate profit according floating lot size and problem solved!