A System.

The best variant so far (I use the term loosely...:LOL: ).
H1
UK 07:00-10:00
USA 13:00-15:30
30 point stop loss.

Again though, largely worthless - look at the Drawdown chart - hideous
For that reason, just in case anyone is thinking of using this:
Drawdown is excessive for a 1 lot.
Also, its just a backtest, no monte carlo, bootstrapping or forward testing has been done.
The source code text file gives you an idea of the end result.

So maybe Heiken Ashi has some merit, or is it more to do with cutting losses
and controlling entry time...:)
 

Attachments

  • HA test H1 30pt STOP uk & usa sesh.png
    HA test H1 30pt STOP uk & usa sesh.png
    42 KB · Views: 196
  • HA test H1 30pt STOP uk & usa sesh.xls
    20 KB · Views: 162
  • HA test H1 30pt STOP uk & usa sesh DRAWDOWN.png
    HA test H1 30pt STOP uk & usa sesh DRAWDOWN.png
    56.2 KB · Views: 200
  • HAeod code.txt
    80 KB · Views: 269
Last edited:
Hmm, considering how many views this thread has had in such a short
space of time I'm becoming increasingly aware of potentially how dangerous
this is getting.

I'm referring to the fact that its starting to move in the right direction.
Or at least the illusion of that fact is present.
If I continue, the risk of someone actually using this increases.
Thats a risk as its only a backtest, and essentially worthless.

For that reason, I'm stopping here.
There are instructions on getting started with Ninja here, free data and import
instructions:
http://www.trade2win.com/boards/trading-systems/161888-system.html#post2011254
http://www.trade2win.com/boards/trading-systems/161888-system.html#post2011264
http://www.trade2win.com/boards/trading-systems/161888-system-5.html#post2011472
Everything is here for anyone that wants to continue with it.
All I've done so far is extremely basic.

I strongly believe anyone doing this should understand it themselves,
and conduct the process themselves.

That doesn't mean I'm done with the thread, I'm just not doing any more work
on this heiken ashi strat on this thread.
 
For that reason, I'm stopping here.

You are stopping maybe it's working and you wanna keep all the secretz ?

I reckon someone should carry on with this and put some real money on it. Demo/virtual pips holds no attraction to me. A system that is not subjected to real market plays is as good as useless.
 
You are stopping maybe it's working and you wanna keep all the secretz ?

I reckon someone should carry on with this and put some real money on it. Demo/virtual pips holds no attraction to me. A system that is not subjected to real market plays is as good as useless.

:rolleyes:
Its stopped working since october 2008, the test shows no profit since then.
Also a large part of the test profit comes from a spike during 2008.
The drawdown risk is also too high, monte carlo sim shows 58% chance of
drawdown greater than 20k.

Also 12% chance of drawdown greater than 30k.
So actually a 16k drawdown is probably not typical, likely to be much worse.
Simple as that, its not robust enough to be worth carrying on with.
Proceeding any further will most likely result in a curve fit.
 

Attachments

  • HA test H1 30pt STOP uk & usa sesh OCT 08 - DEC 11.xls
    20 KB · Views: 288
  • HA test H1 30pt STOP uk & usa sesh OCT08 - DEC 11 DRAWDOWN.png
    HA test H1 30pt STOP uk & usa sesh OCT08 - DEC 11 DRAWDOWN.png
    47.7 KB · Views: 167
  • HA test H1 30pt STOP uk & usa sesh OCT08 - DEC 11.png
    HA test H1 30pt STOP uk & usa sesh OCT08 - DEC 11.png
    48.2 KB · Views: 190
  • DRAWDOWN monte carlo simulation H1 uk & usa sesh 30pt SL OCT08 - DEC11.png
    DRAWDOWN monte carlo simulation H1 uk & usa sesh 30pt SL OCT08 - DEC11.png
    44.7 KB · Views: 197
  • DRAWDOWN monte carlo simulation H1 uk & usa sesh 30pt SL.png
    DRAWDOWN monte carlo simulation H1 uk & usa sesh 30pt SL.png
    45.9 KB · Views: 209
Last edited:
Yeah, but now you have to actually define an ambiguous term such as
"a trend is more likely to continue" in binary logic.
Nowhere near as easy as you think.

An algo will literally do whatever you tell it with no interpretation.
Tell it to cross the road, and supply no other instructions, it will
walk straight in front of a bus.

Thats the issue, binary logic has SFA to do with human logic.
It takes a while to adjust to that mindset and think in binary logic.

Assumptions, assumptions, assumptions then analysis, analysis and more analysis.
 
Hi LV. Thanks for the input mate. Backtesting and curve-fitting. The backtests that you are running, how many trades per day do you account for?

example: 1 daily HA bull candle, buy @ 00:00hrs next daily HA (using same ATS)

This is nothing like how i trade them mate, i have no set number of trades. I check at regular intervals,and if a pair is not trading then i'm back in as per the rules.
 
If you can come up with a simple rule to avoid chop in a timely manner, I think Goldman would be interested in it.

Seriously - such a thing would be the holy grail of trading.

Couldn't agree, more.
Thats the root of the issue.
 
example: 1 daily HA bull candle, buy @ 00:00hrs next daily HA (using same ATS)

That may explain things a little, Oanda build daily bars from midnight to midnight.
What time is a daily bar supposed to start and end? @ Forex Factory

In fact the whole issue of forex daily bar starts is TBH a complete f**k up.
Different brokers use different times.
MBT do the same (midnight daily start), to make matters worse, Ninja timestamps bars as bar close:
Time[0] - NinjaTrader Support Forum
Also Ninjas session end is 22:00 GMT.
See pics attached.

More on daily bar starts and timestamps:
New daily candle, when should it be drawn? @ Forex Factory
When does the forex day begin and end? - Page 2

All these problmes are generally overcome by dealing in H1 or lower,
otherwise these issues rear their head.
I''ll answer the rest of your question in next post :)
 

Attachments

  • Ninja timestamps and sesh start.PNG
    Ninja timestamps and sesh start.PNG
    68 KB · Views: 199
  • MBT timestamps and sesh start.PNG
    MBT timestamps and sesh start.PNG
    79 KB · Views: 206
Hi LV. Thanks for the input mate. Backtesting and curve-fitting. The backtests that you are running, how many trades per day do you account for?

example: 1 daily HA bull candle, buy @ 00:00hrs next daily HA (using same ATS)

This is nothing like how i trade them mate, i have no set number of trades. I check at regular intervals,and if a pair is not trading then i'm back in as per the rules.

TBH for a rule based method you need to strictly layout your conditions.
There is zero room for interpretation.
An example is the bold highlight of your quoted post.

An algo will either check at bar close or continously check.
Thats not to say your statement couldn't be defined in binary logic.
I'll demonstrate that now.

In order to fulfil your check and re-enter if flat rules you would need something like this:

Rule:
If market position = flat
Bars since exit >= 10

Action to take if rule satisfied:
Enter long 100k

That rule is not C# but broadly similar to the terms used.
That would check to see if flat and if so,
re-enter 10 bars after exit.

Obviously trade direction and size are based on other aspects of the
rule I haven't mentioned - namely the signal Heiken ashi is generating.
You get the picture though, there is zero room for vague rulesets.
Offcourse you can input vague rules, they will just be ignored though.
They have to have a yes / no answer in order to execute.
Maybe or ish sort of won't work :)

Thats what I mean by the gap between binary logic and human discretionary logic and interpretation.
The two may appear to be similar on the surface, in reality, its these small differences
that actually mean, as approaches, they are poles apart.
In other words, a concrete ruleset is an essential starting point if you want to code it.

That is actually why randomness is actually a better basis imo, as its basically pure binary logic
in terms of signal generation at least.
No complex rules to define.
 
Last edited:
wk1.jpg

View attachment Trades History 1.htm

View attachment Trades History 2.htm


Here's wk 1 data. I'll put some data up every 1-2 wks, for anyone who's interested. I can tell you now that if i had used a 1:1 r:r the profits would have been substantially higher. Still, it's only wk 1.

Random. Well it's certainly not price or time sensitive. Surely a good thing? I mean, when u become 'sensitive', u become weak, a target...don't ya?
 
View attachment 149828

View attachment 149830

View attachment 149832


Here's wk 1 data. I'll put some data up every 1-2 wks, for anyone who's interested. I can tell you now that if i had used a 1:1 r:r the profits would have been substantially higher. Still, it's only wk 1.

Random. Well it's certainly not price or time sensitive. Surely a good thing? I mean, when u become 'sensitive', u become weak, a target...don't ya?

TBH that is impossible to automate as it stands.
Its based on intra bar granularity I mentioned earlier.
All the entries are taken on an evolving and open daily bar.
If it works for you great, but the only way to automate it would be on
replay data.

Failing that, pick a lower base time frame such as H1, m30/15.
Also worth considering tick charts instead as the sideways chop
and false signals are reduced as tick charts condense it.
Although that would reduce the false signals, it would still be
susceptible to chop.

The issue of gaps between exit and re-entry could be solved by
checking if re-entry is needed in the time windows you currently check manually.
Personally I'm doubtful it can be automated without becoming over complex.
 
TBH that is impossible to automate as it stands.
Its based on intra bar granularity I mentioned earlier.
All the entries are taken on an evolving and open daily bar.
If it works for you great, but the only way to automate it would be on
replay data.

Failing that, pick a lower base time frame such as H1, m30/15.
Also worth considering tick charts instead as the sideways chop
and false signals are reduced as tick charts condense it.
Although that would reduce the false signals, it would still be
susceptible to chop.

The issue of gaps between exit and re-entry could be solved by
checking if re-entry is needed in the time windows you currently check manually.
Personally I'm doubtful it can be automated without becoming over complex.


Totally agree. At the moment i'm checking and trading 3-4 times a day (last was at approx 19:30 yesterday off the top of my head)

If the system does make money in the long-run, i'd just like to make it clear that it would not be because of HA candles.

As for chop, one way of dealing with this could be uncorrelated markets or at least multiple markets. Or scalp ticks, lots of spins.

Once i've made or lost about 10% of acc. value i'll change params. I'll start with 1:1.5.
 
Auto trailing stops. One element of the ats that i find to be quite negative is that you have to make a profit to break even.
 
Going back to the original dukas data source on page 1 of this thread.
Its OK for dipping a toe or for stuff that doesn't require pure tick data.
There are ways of pulling tick data from dukas using PHP scrips or the dukas
J forex platform.
Manually pulling tick data is restrictive as you can only pull one day at a time,
which then needs manually processing with the instructions on page one (don't even go there...).
Bear in mind dukas data only goes back to 2007.
They do more than just FX though, commodities, indices, and stocks (all based on dukas CFD price feed).

TBH though, for the best data I would use one of these sources:
Historical Intraday Tick by Tick Data | Stock Market Data | Historical Futures, Equities, Index and Options Data
Probably best all round for access, price and ease of formatting using their TickWrite software:
Investing Tools | Historical Intraday Tick Data Software Demo | TickWrite 7 & Time Series Builder Demos and User Manuals | Stock Market Trading Tools | Tick Data
That can output in NT format direct from source.

Others:
https://www.cqgdatafactory.com/
CME Datamine - Historical Market Data on select CME Group contracts
NxCore Historical Data
OlsenData: Historical Data

Some other notable free sources:
Sources/Vendors for tick data - Vendors and Product Reviews
Elite Membership Info
 
new basket.jpg

Bit of streamlining/restructuring. Basically i've got rid of the exotics and doubled the amount of units traded per pip. This should hopefully save on spread costs.
 
Top