in my backtest desiring to have precise entries at precise pivot values and accordingly desiring to avoid the variations due to the nature of limit and stop orders for the better price, I found out I can obtain it using simultaneously in the same line of code both limit and stop commands like this example below:
Code: Select all
IF ...<some conditions are true>... then buy 1 contracts next bar at pivotlong stop pivotlong limit;
In the reality, using this code in the real time with my broker (webank) I get every time that it fills two orders for 2 contracts while I want it operates only with 1 contract as specified in my statement.... but why? Why does this statement allow me to enter at a precise value I want (pivotlong) in the backtest phase but when I turns it on in the real word with "automate order execution" it sends orders for two contracts?
Thank you,
auato