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
VIP
Does the strategy Buy and Sell automatically? or do I have to place the trade?
 
BenTen

BenTen

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

horserider

Active member
Warehouse
@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 ?
 

Top