Good evening again.
Here are some questions about how I can incorporate various trading instructions into one block:
1. A trade should be closed if the closing price is below the 200-day simple moving average (SMA) for more than two days.
2. A trade should be closed if the price has risen by more than 25% in a single day, meaning today's closing price > yesterday's closing price * 1.25.
3. Number of closing prices over the last 2500 days.
4. Trading volume (currency) greater than 20 million per day on average over the last 21 trading days.
Thank you.
Here are some questions about how I can incorporate various trading instructions into one block:
1. A trade should be closed if the closing price is below the 200-day simple moving average (SMA) for more than two days.
2. A trade should be closed if the price has risen by more than 25% in a single day, meaning today's closing price > yesterday's closing price * 1.25.
3. Number of closing prices over the last 2500 days.
4. Trading volume (currency) greater than 20 million per day on average over the last 21 trading days.
Thank you.
Rename
1. A trade should be closed if the closing price is below the 200-day simple moving average (SMA) for more than two days.
- Indicator Compare to Indicator (Close < SMA200)
- Add the Qualifier for N Consecutive Days (2)
2. A trade should be closed if the price has risen by more than 25% in a single day, meaning today's closing price > yesterday's closing price * 1.25.
- Indicator Compare to Value (ROC(1) > 25)
3. Number of closing prices over the last 2500 days.
- ? I don't understand this one
4. Trading volume (currency) greater than 20 million per day on average over the last 21 trading days.
- SMA(Volume,20) > 20,000,000
- Indicator Compare to Indicator (Close < SMA200)
- Add the Qualifier for N Consecutive Days (2)
2. A trade should be closed if the price has risen by more than 25% in a single day, meaning today's closing price > yesterday's closing price * 1.25.
- Indicator Compare to Value (ROC(1) > 25)
3. Number of closing prices over the last 2500 days.
- ? I don't understand this one
4. Trading volume (currency) greater than 20 million per day on average over the last 21 trading days.
- SMA(Volume,20) > 20,000,000
Regarding point 3): That the stock has at least 2500 closing prices (and is therefore tradable for approximately 10 years)
Ah ok. One way I can think of would be to test if SMA(2500) > 0
QUOTE:@Glitch
to test if SMA(2500) > 0
I'm reading the goal of this inquiry entirely differently than you are. I "think" the poster wants to be sure there's position turnover for every trading day for the last 10 years; 250*10=2500. But I could be wrong.
I would suggest he alternatively watches the recent trading Volume of the stock instead to make sure there's sufficient trading activity. Something like ADX(Volume,22) for an indicator might work. I do something like this for my stock screener, but I've never done anything like this for a trading strategy.
Your Response
Post
Edit Post
Login is required