- ago
Hi guys,
I have a fairly simple question that's throwing me for a loop.

I'm using the building block strat builder to put together a simple trend following strategy with the following criteria:
Buy if:
1) Price(high) >= SMA(60)
2) SMA has positive slope
3) Other indicators to come, but limiting here to isolate problem
Sell if:
1) Price < SMA(60)

I have the following building blocks in place. My issue is that the strategy will trigger when price crosses the SMA line. However, if my buy criteria are met when price is well above SMA, the Buy Stop block will not trigger. The problem is that the Buy Stop only allows the condition to 'Buy when price is X% above indicator'.

My question is, how do a modify/add condition so that I can Buy Stop when price is >= 0% above SMA?





Note that in the chart image, the strat should signal a buy at the beginning of the blue dots, but only actually triggers a buy where it does because price gets close enough to SMA to meet the '0% above SMA' criteria.

Thanks for your help, guys!
0
516
Solved
5 Replies

Reply

Bookmark

Sort
- ago
#1
Is your position sizing set to 100% equity? If so, try changing it to let more trades come into play.
0
Best Answer
- ago
#2
Thanks, Eugene.
Interesting. I had my equity set at 98%.
When I adjust from 98% to 95%, it moves the buy over to 3 bars past the start of the blue dots.
When I adjust from 95% to <=94%, it moves to the start of the blue dots. This is what I want!

What is the reason that equity affects where the buy is initiated?
0
Glitch8
 ( 10.62% )
- ago
#3
The reason is that the number of shares to purchase is based on the stop price. If you are using 100% of equity, but the price opens much higher that the stop price, like in your Strategy, the account would never have enough money to buy the shares.

You should simulate a margin account by setting Margin Factor to 2 in Position Sizing to be able to fill the trades.
1
- ago
#4
The effect is explained in the Help > Strategy Settings: Basis Price.
0
- ago
#5
Got it. That makes perfect sense.
Thanks to you both!!
0

Reply

Bookmark

Sort