SPY 1 Minute Day Trader — Strategy by fbearman2000

By fbearman2000

Performance Metrics

Description

Mar 8, 2023When scalping options, users are looking for where breakouts are going to occur instead of sitting thru areas choppy price action that drain delta and cause them to lose value even if price is up trending. This script tries to identify when a trend reversal is expected based on one minute price action on the SPY. It alerts users to prepare for potential breakout when 5 out of the 6 key optimized parameters are discovered by showing a white L or S. Once all six trigger, it informs the user at the close of that candle with a golden triangle with Pivot Up or Pivot Down. As scalping options is something that is expected to be short in duration, a take profit and stop loss of 30 cents of price actions is established. If five or more parameters occur after the pivot is initiated, then stop losses and take profits are adhered to; however, if there are less, then it waits to take profit or stop the trade, as likely it is just noise and it will finish trend with an additional breakout.This script has been created to take into account how the following variables impact trend for SPY 1 Minute:ema vs 13 ema : A cross establishes start of trendMACD (Line, Signal & Slope) : If you have momentumADX : if you are trendingRSI : If the trend has strengthThe above has been optimized to determine pivot points in the trend using key values for these 6 indicatorsbounce up = ema5 > ema13 and macdLine 20 and macdSlope > 0 and signalLine > -.1 and rsiSignal > 40bounce down = ema5 -.5 and adx > 20 and signalLine .11. This allowed the time between successful trades shrink to 7 minutes since not taking noisy trades. Now also only closing trades right before 10AM & 4PM (eliminated 1PM and 3PM). Backtest results indicated that trades shrunk by more than 50% but profits close to doubled and percent profitable jumped to over 70% due to noisy trades being removed.Mar 12, 2023Release NotesNow including 5 min 5 EMA (blue) and 13 EMA (orange). These are used on 1 min to exit trades which are trending and not take trades when the difference is less than 0.12. If less than 0.12 and only parameter not hitting, you will see a 5 below/above the L or S that is prepping you to get ready for pivot point.Mar 13, 2023Release NotesThere are 10 parameters not 9 so needed to update for Pivot Signals and letters to show properly.Mar 13, 2023Release NotesPrior release was correct plus needed to remove unnecessary indicators.Mar 13, 2023Release NotesDiscovered a couple inconsistencies with macdLine letter colors so updated.Mar 13, 2023Release NotesRemoved candle spike logic as noisy trades have been removed.Mar 14, 2023Release NotesUpdating description. Now that this works with any trending stock, stops and take profits are 0.00075%Tweaked bounce up and bounce down logic with aUpdated description about wait period for trades as none is enabled due to removing noisy tradesMar 14, 2023Release NotesOnly cleaned-up notes in code. Reload not necessary for this version.Mar 14, 2023Release NotesOnly now entering long trades if close > open and short trades if close 0 and Pivot Up 13 EMA for Pivot DownNo trades in first 10 minutes of day and last 5 minutes of dayClose all positions in last 3 minutes of dayFrom 1PM until 3PM will now take HOD & LOD tradesNow showing Exit Longs if stopped as Exit Longs Stopped and if Exist Shorts if stopped as Exit Shorts StoppedMar 26, 2023Release NotesNow give flexibility to enable and disable trading times in Inputs. They are broken into 5 segments:9:30 until 11 (default on)11 until noon (default off)Lunchtime (default on)1 until 3 (default on)Power Hour (default off)This way if you don't want alerts you won't get bothered during these times.Improved logic exiting trades to take profit sooner but if trending to allow it to runMar 26, 2023Release NotesHad to remove Stoichastic... ugh.Mar 27, 2023Release NotesCleaned-up bug in 1 to 3 5 min 5/13 diffMar 27, 2023Release NotesHad to remove volume.Mar 27, 2023Release NotesEnabled all timeframes for trading by default. Can disable in Inputs. 11-12 and Power Hour are typically bad times to trade.Made one parameters missing descriptive and on by default. Can disable in Inputs if clutters screen with ability to toggle if interested.Mar 27, 2023Release NotesCritical Update:Discovered that exiting partial positions weren't occurring properly unless users had proper strategy of percent of equity selected vs the default. Updated strategy in order to approx. tune for a pair of 1 DTE ATM option contracts being bought/sold on SPY. Exit Partial refers to selling one contract and holding runner until Exit flashes for remaining.initial_capital=1800000, default_qty_type=strategy.percent_of_equity, default_qty_value=15, pyramiding=0, commission_type=strategy.commission.cash_per_order, commission_value=1.3Mar 28, 2023Release NotesDefault state of missing 1 parameter from Pivot Up and Pivot Down signals, silver Ls and Ss, will now only show recent reasons with ability to hover over and have tool tip explain why position wasn't initiated.To see reasons for all time, simply check option box in Input (default is unchecked to show as stated above).Mar 30, 2023Release NotesCritical Update:Discovered a few repaints occurring so added barstate.isconfirmed to eliminate.Also check out new SPY 4 Hour Swing Trader! It works great with SPXL!!!Apr 9, 2023Release NotesSwitched First 90 minutes of trading following one set of conditions to first 60 minutes. This in turn has next 30 minutes follow new conditions which now make 10: 30 until lunch profitable time period. Suggest not trading during power hour as this is still loses money. Also, forcing trades once over 2x to take profits vs adhere to limit order which improves profitability as well. Updated first hour of trading to lime and next 90 minutes to green.Apr 9, 2023Release NotesFixed partial profit logic.Apr 9, 2023Release NotesAfter re-evaluating, removed partial logic as now able to re-enter if continuing trend after counter-trend.Apr 14, 2023Release NotesCritical Update:Was not detecting long properly and was shorting on false signals. Fixed parameters.Apr 14, 2023Release NotesTweaked exiting trade to improve profitApr 14, 2023Release NotesUpdated trading pivot triangle colors for pivot signals based on how successful:9:30 until 10:30 -> Green10:30 until Noon -> Red (In backtesting didn't benefit)1:00 until 3:00 -> Lime3:00 until 4:00 -> LimeRemoved unnecessary notesApr 15, 2023Release NotesUpdated to take more high and low of day trades first thing in morning (until noon) and during 1PM until 3PM as well.Will start trading after first 5 minutes after open.Apr 21, 2023Release NotesAdded Stop Loss & Take Profit to InputsAdded Configurable date that is now tuned for 4 SPY 1 DTE option contracts that are to see profit or loss for dayFound missing barstate.isconfirmed's that should correct any repaintsMay 12, 2023Release NotesTweaked 5 minute differences between 5 and 13 EMAs. Eventually may rethink this part of strategy as it seems to change. Maybe this will be the last time for the tweak?May 17, 2023Release NotesSimplified getting into long trades by only including 5 ema > than 13 ema with 5 min 5 ema > 5 min 13 ema and RSI Signal 60No longer need to show prep signals!Jun 8, 2023Release NotesAdded alert messages to strategies so when alerts appear they can be more descriptive and show message indicating what action to take.Add the following code to your alert:{{ticker}} @ {{time}}{{strategy.order.action}}{{strategy.order.alert_message}}Jun 8, 2023Release NotesForgot to remove indicators and lines.Jun 29, 2023Release NotesTrying to see if removing plotshape fixes alerts. Also removed excess commenting.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView