RockBot Instruction Manual

An Automated Trading Strategy for NinjaTrader and TradingView

Introduction

The RockBot is a powerful, automated trading script developed from over 26 years of trading experience. It has been meticulously refined for scalpers and short-term traders, supporting multiple trading platforms including NinjaTrader and TradingView.

Whether you’re trading futures, stocks, or indices, RockBot is designed to adapt to a wide range of time frames and instruments. From 1-minute charts to 10-tick range charts, this strategy is flexible, fast, and focused on delivering high-probability trade setups.


Core Methodology

At its heart, RockBot uses George Lane’s stochastic oscillator, reimagined with a custom divergence formula and multi-timeframe visualization through stochastic bands.

This multi-layered system helps confirm trade setups by showing confluence across different timeframes—a key advantage for short-term precision entries.


Trade Identification and Execution

The internal algorithm identifies divergence-based trade setups and automatically executes them. However, user-defined parameters play a crucial role in shaping:

  • Trade duration

  • Profit targets

  • Stop loss distances


Key Bot Features

🔸 Divergent Low Stop

One of RockBot's standout features: the Divergent Low Stop.
When a divergence pattern is detected, this stop loss is placed at the low of the divergence setup. If the pattern breaks down, you're immediately out of the trade.

Alternatively, you can set a manual stop in ticks, allowing you to define your own stop-loss range.


🔸 Choosing Trade Duration and Targets

One of the toughest questions in trading is:
"How long should I stay in a trade?"

With RockBot, you're in control. But to make good decisions, it's essential to understand the average range of the instrument you're trading.

For example:
If you're trading the ES/MES on a 1-minute chart, you might expect typical moves from 3 ticks to multiple points. Settings should reflect these dynamics.


🔸 Long or Short Settings

RockBot can take both long and short positions.
Make sure to check the correct box before trading.

You can also enable confirmation color bars to make trade signals more visually distinct.

Rockstar Tip:

  • Use Green for Long

  • Use Orange for Short


Take Profit Settings

RockBot offers three layers of take-profit settings:

  • Take Profit Contract 1

  • Take Profit Contract 2

  • Take Profit Contract 3

You can activate one, two, or all three. Each has a corresponding tick value, telling the bot when to exit a portion of the position.

Default Values:

  • Take Profit 1: 6 ticks

  • Take Profit 2: 15 ticks

  • Take Profit 3: 0 ticks (open-ended trade)

Rockstar Tip:
If a take profit value is set to 0, it becomes an open trade. In this case, your exit is managed via the Trailing Stop settings.


Stop Loss Settings

🔹 Signal Bar Low for Longs

🔹 Signal Bar High for Shorts

This is the default setting, and highly recommended for divergence-based strategies.

🔹 Manual Stop in Ticks

Set your own custom stop-loss value if you prefer a fixed-risk approach.


Trailing Stop Settings

If you want to ride the trend, enable the Trailing Stop Loss (TSL) system.

Trailing Stop Inputs:

  • TSL Start: When to activate the trailing stop (e.g., after 8 ticks of profit)

Defines when the trailing stop activates (e.g., after 8 ticks of profit).

Example: If set to 8 ticks, the trailing stop kicks in after the trade moves 8 ticks in your favor.

  • TSL Step: How many ticks to move the stop each time price moves in your favor

Determines how the stop “trails” the price (e.g., 1 tick, 2 ticks).

Example: A TSL Step of 2 means the stop moves up every 2 ticks of price movement.

  • TSL Stop: How far behind the current price the stop should remain.

Sets the distance (in ticks) between the current price and the trailing stop.

Example: A TSL Stop of 8 ticks means the stop trails 8 ticks below the price.

Rockstar Tip:
Set your TSL Start and TSL Stop to the same value for a break-even stop loss.
This ensures that once price moves up 8 ticks, your stop is placed 8 ticks below—right at the original entry.


Market Conditions and Range Analysis

RockBot’s performance depends on understanding the market’s typical and normalized range for your chosen instrument and timeframe. Follow these steps to analyze ranges:

  1. Select Timeframe: Use 1-minute, 3-minute, or 5-minute charts (or tick/range charts).
  2. Identify Parallel Channels:
    • On your chart, look for parallel trendlines forming a channel (upper and lower bounds).
    • Most platforms offer a distance measurement tool to calculate the range between the upper and lower lines.
  3. Measure Range:
    • For example, on the ES/MES 1-minute chart, ranges typically vary from 3 ticks to multiple points depending on volatility.
    • Record the average range over several sessions to establish a baseline.
  4. Adjust Parameters:
    • Set profit targets and stop losses within the observed range.
    • Example: If the ES/MES 1-minute range is 8–12 ticks, set Take Profit 1 to 6 ticks and Take Profit 2 to 10 ticks.

Note: Ranges vary by instrument and market conditions (e.g., high volatility vs. low volatility). Recalibrate settings during trending or choppy markets.


RockStar Tips for Optimal Performance

  • Use Divergent Low Stop: This is the safest option for divergence-based trades, as it aligns with the pattern’s structure.
  • Open-Ended Trades: Set Take Profit 3 to 0 for trending markets, letting the trailing stop capture larger moves.
  • Breakeven Stop: Match TSL Start and TSL Stop (e.g., 8 ticks) to lock in profits without risking losses.
  • Monitor Market Conditions: Adjust profit targets and stops based on volatility (e.g., tighter ranges in low-volatility markets).
  • Backtest Settings: Use NinjaTrader’s Strategy Analyzer or TradingView’s backtesting tools to validate your parameters.
  • Start Small: Trade micro-contracts (e.g., MES) or small share sizes until you’re confident in your settings.


Final Thoughts

The RockBot script is the culmination of years of market experience—fine-tuned for real traders. While it automates many processes, your input as a trader still matters. Understanding your instrument's range, volatility, and behavior will help you customize the settings for peak performance.

Disclaimer

Trading involves significant risk of loss and is not suitable for all investors. RockBot Scripts are provided for educational and informational purposes only and do not constitute financial advice. Past performance is not indicative of future results. Always test strategies in a demo account before live trading and consult with a financial advisor if needed.



✅ Example Trade Setup: Bullish Divergence on ES 1-Minute Chart

Chart Type: 1-Minute Candlestick

Instrument: ES (E-mini S&P 500 Futures)

RockBot Settings Used:

  • Take Profit 1: 6 ticks

  • Take Profit 2: 15 ticks

  • Take Profit 3: 0 ticks (open-ended trade using trailing stop)

  • Stop Loss: Divergent Low

  • Trailing Stop Start: 10 ticks

  • Trailing Stop Step: 1 tick

  • Trailing Stop Stop: 10 ticks

  • Signal Color Bar: Green (long), Orange (short)


Setup Conditions:

  • Price makes a new lower low, but the stochastics do not (bullish divergence).

  • Stochastic band confluence shows strong support on multiple timeframes.

  • Bot identifies the divergence and paints a green entry bar.

  • Divergent low stop placed automatically.

  • Take profit targets and trailing stop parameters already defined.


🟩 Entry Trigger:

  • A green bar appears — this is your long signal.

  • RockBot enters the trade automatically (or you can manually confirm depending on your config).


📈 Trade Progression:

  1. Entry Price: 4200.00

  2. Stop Loss: 4198.75 (5 ticks below the low of divergence candle)

  3. TP1 Hit at: 4201.50 (6 ticks profit) — partial position closed

  4. TP2 Hit at: 4203.75 (15 ticks profit) — more position taken off

  5. Trailing stop now active at 4201.50 (10 ticks below the high)

  6. Price moves up to 4205.00

  7. Trailing stop tightens to 4203.75

  8. Price pulls back and trailing stop hits — final portion closed


🔚 Trade Summary:

  • Risk: 5 ticks

  • Max Profit: ~5.25 points (21 ticks)

  • Trade Duration: ~5–8 minutes

  • Success Factors:

    • Clear divergence

    • Multi-timeframe support

    • Defined risk and profit structure

    • Emotional control minimized by automation


🖼️ Trade Example (Below)

NinjaTrader Script Update Instructions

Overview

If you encounter the error message: "You have custom NinjaScript files on your PC that have programming errors. These errors must be resolved before you can import a NinjaScript archive file," it indicates that old or conflicting NinjaScript files or compiled assemblies on your computer are preventing the import of the new script. Follow these steps to remove the old scripts, clear related assemblies, and import the updated script successfully.

Prerequisites

  • Ensure NinjaTrader is installed (version 8 or later recommended).

  • Have the new NinjaScript archive file (e.g., NewScript.zip) ready.

  • Back up any custom scripts or settings before proceeding.

Step-by-Step Instructions

Step 1: Close NinjaTrader

  1. Save any open workspaces or settings in NinjaTrader.

  2. Completely close the NinjaTrader application.

Step 2: Delete Old Script Files

  1. Open File Explorer on your computer.

  2. Navigate to the NinjaTrader scripts folder:

    • Default location: Documents/NinjaTrader 8/bin/Custom

    • If you installed NinjaTrader in a different directory, locate the bin/Custom folder within that installation path.

  3. Inside the Custom folder, find the old script files (e.g., .cs files) related to the script you are updating.

    • Example: If the script is named MyTradingScript, look for MyTradingScript.cs or similar files in the Custom folder or subfolders like Indicators or Strategies.

  4. Delete the old script files:

    • Right-click the file(s) and select Delete.

    • If unsure which files to delete, consider moving all custom files to a temporary backup folder outside the Custom directory (e.g., to your Desktop).

  5. Check subfolders (e.g., Indicators, Strategies) and delete any related files there.

  6. Empty the Recycle Bin to ensure the files are fully removed.

Step 3: Remove Compiled Assemblies

  1. Open NinjaTrader.

  2. Go to Tools > Remove NinjaScript Assembly in the NinjaTrader Control Center.

  3. In the dialog box, select any assemblies related to the old script (e.g., named similarly to MyTradingScript).

    • Note: If no relevant assemblies are listed, proceed to the next step.

  4. Click Remove and confirm the action.

  5. Close the dialog box and restart NinjaTrader to ensure the changes take effect.

Step 4: Clear NinjaTrader Cache (Optional)

If the error persists after deleting files and assemblies, clear the NinjaTrader cache:

  1. Navigate to: Documents/NinjaTrader 8/db/cache.

  2. Delete all files in the cache folder (safe to remove, as NinjaTrader will regenerate them).

  3. Alternatively, in NinjaTrader, go to Tools > Options > Clear Cache and click OK.

Step 5: Import the New Script

  1. Open NinjaTrader.

  2. Go to Tools > Import > NinjaScript Add-On.

  3. In the file explorer window, locate the new script archive file (e.g., NewScript.zip).

  4. Select the file and click Open.

  5. NinjaTrader will compile and import the script. You should see a confirmation message if successful.

  6. If prompted to overwrite existing files, select Yes to ensure the new script replaces any remnants of the old one.

Step 6: Verify the Script

  1. Check that the script appears in the appropriate NinjaTrader menu:

    • For indicators: Charts > Indicators.

    • For strategies: Strategies menu or Strategy Analyzer.

  2. Apply the script to a chart or strategy to confirm it works as expected.

  3. If errors persist, repeat Steps 2–5 or contact support (see below).

Troubleshooting

  • Error persists after import:

    • Ensure all old script files and assemblies were removed (check subfolders and the Remove NinjaScript Assembly tool again).

    • Verify the new script file is not corrupted by downloading it again.

    • Clear the cache (Step 4) and try importing again.

  • Unsure which files or assemblies to delete:

    • Back up the entire Custom folder to a safe location, then delete all files in Custom and re-import the new script.

  • Compilation errors:

    • Ensure you are using the correct NinjaTrader version compatible with the script.

    • Contact the script developer for version-specific requirements.