[Blogger Feed] [Add to My Yahoo!] [Subscribe with Bloglines] Powered by Feedburner [Add to Google] [Blogroll Me!] [Add to Technorati Favorites!]

2005-07-13 19:45

test of the trading simulator: using stop and reverse

I want to be able to set a stop at a given number of ticks and reverse position at the stop instead of closing my position.

I changed the following modules:

trade.py



money.py


and the script

dotrade.py


The resulting orders for a stop set at 2 ticks and 6 ticks are in

orders5m_reverse2.csv


orders5m_reverse6.csv


and the executions are in

execs5m_reverse2.csv


execs5m_reverse6.csv


This is the chart (click it to see it full-size):



To understand what is going on, bear in mind that the chart shows:

1) the highs and lows of the 5m bars in grey
2) short entries as black dots
3) long entries as blue dots
4) stop executions as red dots
5) entries resulting in a loss as red circles around the corresponding dot
6) green lines connecting entry and exit of a winning trade
7) red lines connecting entry and exit of a losing trade

This experiment shows a loss of $265.6.

Setting a tighter stop makes things worst. A stop and reverse at 2 ticks results in a loss of $2,444.

Categories: , ,

0 Comments:

Post a Comment

<< Home

Yahoo! Finance MarketWatch
Bloomberg StockCharts
888Options Optionetics
Schaeffer IVolatility.com
MarketWatch Option Chain
Who Links Here

Web Blog Pinging Service