Strategy Guide (193)

Votes
Answers
Views
Question
0
votes
1
answer
1890
views
asked 4 years ago by
Category: Strategy Guide
I am wondering if it is possible to predefine entry price based on signal. That is I want to be able to define what the floating P/L is then be able to have a sell order condition for a % trailing stop based on last highest price. I am using the code...
0
votes
1
answer
352
views
asked 4 years ago by
Category: Strategy Guide
Thinkorswim has a study on Bollinger upper and lower band crossovers for short and long entries, but not for the Midline. I have been trying to code a strategy on the 4hr chart. Each time a 4 hr bearish candle crosses and closes below the Bollinger B...
0
votes
1
answer
135
views
asked 4 years ago by
Category: Strategy Guide
I have tried to code PSAR_LE and PSAR_SE based on the ParabolicSARCrossover Study. However, when it plots on the chart, the entire chart data gets compressed. Can you provide the sample code for such a strategy. The ParabolicSARCrossover Code is as f...
0
votes
1
answer
66
views
asked 4 years ago by
Category: Strategy Guide
Im having some issues backtesting a basic ADX-Stochastic strategy. When running it for some reason some of the orders are going through at price of $1. Any help is appreciated. Thanks
0
votes
1
answer
92
views
asked 4 years ago by
Category: Strategy Guide
A prior post asked about generating alerts indicating time and price for a specific, individual underlying based on trade signals generated by a strategy. I have a strategy from which I would like to create real orders. Could this be done by converti...
0
votes
1
answer
609
views
asked 4 years ago by
Category: Strategy Guide
Hello all, I've been doing some backtesting on the "MovAvgStrat" that comes with the ToS platform, but I'd like to be able to displace the MA in addition to being able to set the length. I attempted to create my own script with copy and pasting the o...
0
votes
1
answer
89
views
asked 4 years ago by
Category: Strategy Guide
Hi Pete, Do you know if there is a way to add a date range to a strategy for execution of orders and backtesting? Example: Oil goes up every year sometime between January 1 and February 15th. I would like to have this date range as part of a strategy...
0
votes
1
answer
92
views
asked 4 years ago by
Category: Strategy Guide
I've had some good luck poking around in here but am having trouble adapting my strategy code. Some background of a similar dummy strategy: Entry Conditions (if ANY of the following is valid): Daily 50SMA crossed above 200SMA OR Daily 50SMA > Dail...
0
votes
1
answer
84
views
asked 4 years ago by
Category: Strategy Guide
Hi Pete, The following  if then statement contains two conditions and it's not working. It's probably a beginner error :). I want buy order if close is < SMA 150 with SMA 10  rising in the last period. This is what i wrote: def scan = (if close &l...
0
votes
1
answer
151
views
asked 4 years ago by
Category: Strategy Guide
I use a simple strategy where in an uptrend if an inside bar appears I buy the break of the top of that bar on the next candle.  I then put my stop loss at the bottom of the inside bar and create a price target equal to the size of the inside bar abo...