For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
StopTrail giving weird Results ....Probably
-
I am using
self.order_target_percent(d, target=self.perctarget, exectype=bt.Order.StopTrail, trailpercent=1)
for the stoptrail implementation. I checked the source code and I expected it to give me the same result that I get when I only use
self.order_target_percent(d, target=self.perctarget)
But I am getting very different results
without stoptrail trailpercent=1 143631.53 with stoptrail trailpercent=1 75766.57
I also got the same value without stoptrail, when I used stoptrail with trailpercent=0, but then I checked the source code and I saw that it is initialized with 0, so they are the same thing.
I still think that if I have a trailing stop with 100% distance then it should be pretty similar(IF NOT SAME) to the case without stopTrail. Am I missing something here?
-
@zuj Now I noticed that even setting trailpercent=0 gives similar but different results?????????
-
I figured it out. StopTrail doesn't work correctly with target orders.