Strategy with only buy signal


Category:
0
0

Hi

Subscriber and I love your videos.

I was looking for a way of using only a buy signal strategy, for example MACDStrat and only using long entries (MACDStratLE) and then looking at the profit at the end of the year.

I can do the strategy but cannot work out how to only “sell” once at the end of the year.

I would either like to have one of two scenarios (or possibly both)

1. Buy at buy signal for 100 shares and sell at sell signal for 50 shares and realise profit at end of year

2. Buy at buy signal cumulatively and sell at end of year and realise profit at end of year.

Please assist. And thank you.

Attachments:
Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on February 14, 2018 10:07 pm
354 views
0
Private answer

First I would like to point out the title of this post is one of the key signals we have reached a top in the market. Sorry, that’s just how market psychology works. I’ve received more and more requests to do long side only signals. By the time folks realize this is an ATM machine, the smart money moves it someplace else. I suspect this has already taken place. Those wishing to profit in the next few years should spend their efforts searching for where they moved it.

For your sell exit signal, I suggest you try this:

def sellExit = GetYear() <> GetYear()[-1];

This will evaluate true on the last trading day of the year.

The order type will be set to Sell_Auto, in order to ensure the strategy knows to sell all shares in the open position. You did not provide any code along with your request so I am not sure you know how to apply that line of code to an order statement. You can get all the details here: http://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Others/AddOrder.html

Be sure to post additional questions if you need help applying this.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on February 15, 2018 9:09 am