Zigzag Bollinger Band

Post Reply
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Black boxing the Empty4 terminal

Post by snailbeard »

This post is for techies, in particular Linux users who run MSW programs via WINE:

1. Reverting to the pre 600 build
2. Preventing an application getting access to the network
3. Preventing auto update from the already downloaded copy of Build 600

1.a. I already previously renamed terminal.exe to terminal-xxx... and that has not changed.
1.b. rename the new terminal to something else.

2.
sudo useradd nonet

# make a group and become a member of it

sudo groupadd netless

sudo adduser brian netless
sudo adduser nonet netless

# now enter an iptables rule to block that group from using the internet you can type this on the terminal and hit enter

sudo iptables -A OUTPUT -m owner --gid-owner netless -j DROP

# to make this rule run after each reboot you can put it in
gksu gedit /etc/rc.local (make sure the last line in that text file says exit 0)

# usage examples:

sg netless ping 127.0.0.1

sg netless "wine MetaCrap.exe"
//////////////////////////////
#Now see if access open to group brian
sg brian "ping google.com"

PING google.com (173.194.34.128) 56(84) bytes of data.
64 bytes from lhr14s21-in-f0.1e100.net (173.194.34.128): icmp_req=1 ttl=56 time=23.3 ms

#Now see if access is blocked to group netless
sg netless "ping google.com"

PING google.com (173.194.34.128) 56(84) bytes of data.
ping: sendmsg: Operation not permitted

## So far so good
//////////////////////
3. Stopping an automatic upgrade from the harddisk download:
Renaming the m/q folder seems to work
metacrap-can-still-reinstall-itself-from-download.png
/////////////////////
We should now have the monster locked in a containment field
:D

This is not enough:
We might forget run it from containment
and the monster will run riot all over our harddisk again :shock:

That is why I created a separate user nonet who will always run netless
and in separate protected user space.

That is a bit inconvenient
So I need to be able access nonet login from my normal login using the remote desktop viewer.
Meaning I can see into the blackbox put MetaCrap can not see out.
:smile:

Don't forget to copy the original history files aswell.
In this snapshot I double check that MetaCrap cannot access the outside world:
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

isolation of MetaCrap is working

Post by snailbeard »

The network and disk isolation of MetaCrap seems to be working.
It is nolonger trashing the build 509 or the history files.
I have been able use it all day without any crashes.

The previous post is incomplete because I could not get the ipchains to work,
but AppAmor seems to be doing a good job:

http://wiki.apparmor.net/index.php/AppArmorWine

Also squashed a few bugs and the profit factor is back up to 3.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

The Candlestick Trader

Post by snailbeard »

Now that Empty4 Terminal is no longer pulling the rug from under my feet,
I can actually get on and try out some interesting experiments:

The problem:
SB's entry mechanism is single shot at the begining of a swing, once it is out it does not know how to rejoin the trend. In addition, the partial trades means that a loss is 3x the first profit, so in choppy times it loses its edge.

The Solution:
What if we had a mechanism for jumping back into the swing after SB takes a first bite of the apple?

Perhaps I have found such a method:
The Butcher, The Baker & The Candlestick Trader.

In the process of improving SB's success ratio I started adding candle patterns to the entry filters and these turned out to be very interesting. I wondered what would happen if I made an autotrader that trades solely on the candlesticks using a fixed 1:1 stoploss and target price.

The answer is that we get a very active trading system with an average of 10 trades a week per pair, trades are clustered rather than evenly distributed, so sometimes we get 4 in a day.

This turns out to be an almost symmetric trader having about the same number of wins as losses.
What it needs is a master switch to turn it on and off at the appropriate times.

Here is the a four month equity curve when it runs with a profit factor of 1.2
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Candlestick based reenty trade

Post by snailbeard »

After some experimentation, I have made the candlestick entries conditional on a primary entry which must also be in profit in order to prevent repeating failed trades.
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Complex channel breakout scalp trade

Post by snailbeard »

When the market is noisy it is easier not to trade for a while, but battle-scarred veterans sometimes can't resist the challenge of grabbing a few pips on an otherwise quiet day.

In the chart the longer term dominant direction is down but price ranges at a significant level for a couple of days then gives the appearance of a reversal. In the second half of the second day there is an increase in momentum upwards. The zig-zags and channels help identify the change in price behaviour.

In order for this trade to be worth the risk, the stoploss and target need to make sense.
The highlighted rectangle identifies both the entry signal and a place to put a stop-loss we can get a risk to reward ratio of about 1:2.
The entry signal could be the H1 bar that closes above the line. The stop-loss can be just below the two small bars and the target is about 30 pips or when the price momentum comes to an end at the hanging men dojis.
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Ideal sell setup

Post by snailbeard »

Unlike the last post, this is an example of riding swings in the park:

The dominant direction is down, there is sufficient pullback followed by clues to a move in the dominant direction.
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Zigzag Bollinger Band

Post by snailbeard »

The updated SB version 2.6 placed a couple of trades yesterday.
EurJpy worked out well.
NzdJpy was going well but it seems to be having a bit of a melt down today - could be a bumpy ride...
untradable-NzdJpy-M15-18Feb2014.png
The long term chart could be a clue to whats happening now:
Could it be that the Kiwi has a 7 year itch which just has to be scratched?
NzdJpy-W1-long-term-2007-to-2014.png
You do not have the required permissions to view the files attached to this post.
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Zigzag Bollinger Band

Post by SpiderX »

snailbeard » Tue Feb 18, 2014 6:20 pm wrote: The long term chart could be a clue to whats happening now:
Could it be that the Kiwi has a 7 year itch which just has to be scratched?

Hi snailbeard,

On the second chart....is that your custom indicator ? or is it an indicator that can be downloaded somewhere ?
Trying to find an indicator like that....if you could point me to somewhere to d/l it...that would certainly save me lots of development effort.

Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Zigzag Bollinger Band

Post by snailbeard »

SpiderX » Tue Feb 18, 2014 11:37 am wrote:
snailbeard » Tue Feb 18, 2014 6:20 pm wrote: The long term chart could be a clue to whats happening now:
Could it be that the Kiwi has a 7 year itch which just has to be scratched?

Hi snailbeard,

On the second chart....is that your custom indicator ? or is it an indicator that can be downloaded somewhere ?
Trying to find an indicator like that....if you could point me to somewhere to d/l it...that would certainly save me lots of development effort.

Cheers
Two popular indicators
a) Slipshod's support and resistance
b) SuperSR7 - I think this one was on ForexFactory

PM me if you can't find the downloads.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Rentering after a pullback

Post by snailbeard »

More experiments with reentering a successful trade after taking profit.

In the following two charts AUDUSD H1 and M15 I attempt to generalise a daily channel bias and the charateristics of a pullback, followed by price action in the dominant price direction.
The H1 chart gives an idea about the general price direction over 1 or more days:
audusd-H1-24May2013-daily-channel-with-pullbacks.png
The M15 shows in more detail a typical pullback with price action picking up in the main channel bias:
audusd-M15-24May2012-M15-entry-after-pullback.png
After a few failed attempts at coding up the ideas, I did manage to get some interesting results, although its early days. The pullback detection seems to work reasonably well catching 3 pullbacks for the above:
1 2012.05.24 09:19 buy 1 0.30 0.97482 0.00000 0.00000 0.00 10000.00
2 2012.05.24 09:19 modify 1 0.30 0.97482 0.97165 0.97765 0.00 10000.00
3 2012.05.24 10:19 t/p 1 0.30 0.97765 0.97165 0.97765 84.90 10084.90

4 2012.05.24 19:31 buy 2 0.30 0.97542 0.00000 0.00000 0.00 10084.90
5 2012.05.24 19:31 modify 2 0.30 0.97542 0.97171 0.97771 0.00 10084.90
6 2012.05.25 00:15 t/p 2 0.30 0.97771 0.97171 0.97771 69.30 10154.20

7 2012.05.25 06:17 buy 3 0.30 0.97462 0.00000 0.00000 0.00 10154.20
8 2012.05.25 06:17 modify 3 0.30 0.97462 0.97154 0.97754 0.00 10154.20
9 2012.05.25 07:07 t/p 3 0.30 0.97754 0.97154 0.97754 87.60 10241.80
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Automated trading systems”