SPY Day Trading + Swing Trading Indicators for ThinkorSwim

A

Adeel06

New member
What did you have the stoplosses set to in your backtest?

@BenTen Here is the backtest code for this strategy

Strategy:

Code:
input agg = AggregationPeriod.FIFTEEN_MIN;

input TradeSize = 100;

input fastLength = 19;

input slowLength = 39;

def c = close(period = agg);

Def Value = ExpAverage(c, fastLength) - ExpAverage(c, slowLength);

def B =   Value[1] < 0 and Value > 0;

def S =   Value[1] > 0 and Value < 0 ;

AddOrder(OrderType.BUY_AUTO, condition = B, price = open[-1], TradeSize, tickcolor = Color. GREEN, arrowcolor = Color.GREEN);

AddOrder(OrderType.SELL_AUTO, condition = S, price = open[-1], TradeSize, tickcolor = Color.RED, arrowcolor = Color.RED);
SPY 90 Day 1 Hr Time Frame Results:
Max trade P/L: $964.00
Total P/L: $723.98
Total order(s): 12

 
S

Simteaz

New member
2019 Donor
Does the strategy Buy and Sell automatically? or do I have to place the trade?
 
BenTen

BenTen

Administrative
Staff
VIP
@Simteaz That's only for backtesting. You still have to manually execute the trade.
 
horserider

horserider

Well-known member
VIP
@DDW Sorry Cannot share it. Not that I would not but it is a chart I did as an example for this thread. I do many charts just as tests of things but then erase them. So pretty sure I do not have this particular chart anymore. If I run across it I will share but not likely. Any particular element of interest ?
 
P

Playstation

Active member
VIP
I immediately reduced the number of studies to...2. However, this seems very specific to SPY, can't use it much on futures.
Do the arrows repaint?
 
Last edited:
B

Bendu

New member
I just found this one this morning, I kind of like it so far. It will need some further testing though.
Indicators on this chart are:
B3 Consolidation box: Breakout/Breakdown
Auto pivot points support & resistance


 
Last edited:
C

Craighaber71

Member
2019 Donor
Warehouse
Is it possible to scan for the Arrows on the daily....I tried in the scan tab but it came up with no results
 
BenTen

BenTen

Administrative
Staff
VIP
@Craighaber71 You have to change the aggregation period of the script to the daily first.
 
D

diazlaz

Well-known member
2019 Donor
VIP
I just found this one this morning, I kind of like it so far. It will need some further testing though.
Indicators on this chart are:
B3 Consolidation box: Breakout/Breakdown
Auto pivot points support & resistance


Nice Find! - here is the share link to the Chart:

http://tos.mx/G7g3YJ

Has anyone had any luck with this system with lower time frames?
 
D

diazlaz

Well-known member
2019 Donor
VIP
Nice simple indicator - thanks for posting.
pretty cool way of plotting the MA's. I wonder if we can incorporate the SlimRibbon logic and do a two line cross over using the differential of the slimribbon? hum.. not sure if that's helpful in any way but might give it a try over the weekend and see if there is some edge there ;)
 
D

dolcea23

New member
@sylar2017 Thank you for sharing. That was really helpful!
Hello. I was trying to input slyer back test code under top for create in edit studies tab however its not working. Any idea if this is the correct way to input a study?
 
BenTen

BenTen

Administrative
Staff
VIP
@dolcea23 Next to the Study tab there is another tab called Strategy. Paste the code in there.
 
Thread starter Similar threads Forum Replies Date
D Questions 0
S Questions 4
High_Velocity Questions 0
R Questions 0
V Questions 8

Top