if i use "sinc" mode and i got partial order fill (for eg. fill 5 instead of 10), currentshares should be 5 correct? therefore in this case is same of marketposition_at_broker rigth?
marketposition_at_broker of course does not work in backtest, therefore i need to have 2 code one to go at market and one for simulation; shouldn't be possible for you to modify the function marketposition_at_broker that if i'm in simulation works like currentshares?
last question: should i use marketposition_at_broker inside of Setprofittarget?
Code: Select all
Setprofittarget(marketposition_at_broker*(entryprice + entryprice * vol_perc*Perc_TargetLong/100)-marketposition_at_broker*entryprice);