Simple Channel Breakout System for testing the autoexecution function
You can either do the trades long only, short only or both long and short -

1. long only - wait for a buy signal before entering the first trade, then setup your TWS to trade at 1 contract each for each subsequent trades - the next signal will be a sell signal and you will be out when it is triggered,  you will then be back in again at the third signal, which should be a buy signal

2. short only - wait for a sell signal before entering the first trade, then setup your TWS to trade at 1 contract each for each subsequent trades - the next signal will be a buy signal and you will be out when it is trigered, you will then be back in at the third signal, which should be a sell signal

3. long and short - enter the first trade with 1 contract, does not matter whether signal is buy or sell, then set your TWS to trade the subsequent signals at 2 contracts each, the next signal will be a stop and a reverse to the opposite direction

Note: The script will write a text file only if the symbol is NQ02M - you can change it to any other symbol.  You can also modify the Window to a longer timeframe.
Warning:  Use this script at your own risk.

Back to the
Main Page , Go to the Download Page

Comments and questions can be submitted
here.