Short at Close if price above upper BB and cover at moving average w/ stop loss
Author: tonypiha
Creation Date: 10/4/2020 1:43 AM
profile picture

tonypiha

#1
Hi guys.
I am not sure here is the right forum to ask this.
I am trying to backtes using the rules menu
I want to open short at the bar that closes above the upper bollinger band ( 20 periods , 2 SD) and cover when prices reach the moving average ( EMA, 20 periods) and a Stop price at the high of the entry bar.
But the results shos no entries...

Thanks in advance
my rules:


and the chart

profile picture

Eugene

#2
Hi Tony,

Firstly, please do not use external image hosters. They are used to disappear with the content. FYI, our forum has a convenient "Add Attachment(s)" button which lets attach multiple images, logs and archives to one's post. I've attached your images to my reply this way and updated the image links in your post.

Now to the missing trades. There is not enough capital to enter the position probably because your dollar size is less than the basis price of the instrument. It frequently happens when backtesting higher-priced indexes. Solution: make sure the position sizing allows to buy/short at least 1 share (contract) of the instrument.
profile picture

tonypiha

#3
Hi Eugene, Thank you
an sorry for the external links
profile picture

Eugene

#4
Tony, glad I could help.
profile picture

tonypiha

#5
Hi Eugene,
I checked again and I run the strategy with 100K and no results were obtained. I tryed to simplify the rules.
Noe I just want to sell Short at the close of the bar that closes outside the superior BB ( 2SD and 20 MA) and cover it at the closing of the first bar that closes below the upper BB.
MY Rules:


Short At Close:
Price is above upper Bollinger band
Cover At close:

Price is below upper Bollinger band

When I use at market ( instead of at close ) it misses a lot of entries
profile picture

Eugene

#6
Hi Tony,

Now your position sizing tells the whole story. That's sort of the same error condition (as hypothetic "dollar size is less than the basis price of the instrument" in my post #2) but from a different angle. Look no further:

Wiki FAQ > I'm using 100% Equity position sizing and strategy doesn't seem to use all capital and/or there are trades not included due to insufficient capital.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).