Rank: Member
Groups: Registered, Registered Users Joined: 3/19/2012(UTC) Posts: 13
|
Hi everyone,
Probably a simple solution, but one that is eluding me. Have read the primer, but getting frustrated with broken results no matter what I try.
In the system tester, I am trying to get it to trigger to buy long when today's high exceeds yesterday's high and to short when today's low goes below yesterday's low.
Thought this would do it and be simple, but no, doesn't seem to be accurate.
H>ref(H,-1)
Actually, what I guess I need to know as well, is if the intraday data is there on a daily chart as well, so that when the new high is hit, the buy is at the next tick and not the close or the high of the second day?
Sorry if this is not clear. Please let me know what other info is required.
Thanks in advance for your help, Darren
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
I wish that I could predict the high and low of each day, never mind each bar! If(H>Ref(H,-1),1, If( L<Ref(L,-1),-1,0))
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 3/19/2012(UTC) Posts: 13
|
Hi...thanks for the help. I too wish I could predict the future, but alas!!!
Unfortunately still not getting where I am hoping to be. The If function doesn't seem to be required in system testing, nor does the binary.
I get the closest results from
Buy H>Ref(H,-1)
Sell L<Ref(L, -1)
But is still doesn't pick out the right bars for entry. Also still looking to see if there is intraday data in there somewhere so that it buys on an intraday price and not a HIGH or LOW or CLOSE.
So, in English I think it would read like this.
IF the PRICE today exceeds the HIGH of Yesterday, THEN buy at the HIGH of Yesterday.
IF the PRICE today goes below the LOW of Yesterday, THEN sell at the LOW of Yesterday.
Hope that helps...again, thanks for the help.
Darren
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 3/19/2012(UTC) Posts: 13
|
Okay, so after messing around with it for many more hours, I ended up building a formula called yesterday.high which plots and does exactly what it should. Then I put the buy at fml("yesterday.high") which triggers correctly. BUT, for the life of me, I can't figure out how to force the system to buy at the cross price? It only wants to use the cross as a trigger and then buy on the next day's open.
How do I force it to use a value I choose? Have tried limits and stop limits to no avail.
In English, this is what I am looking for:
IF the PRICE today (current price) goes above the HIGH of Yesterday (trigger), THEN buy at the HIGH of Yesterday (current price and trigger), UNLESS the OPEN PRICE today is higher than HIGH of Yesterday (gap), THEN buy at the OPEN (next logical entry).
Thanks again for any assistance. Darren
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/6/2010(UTC) Posts: 113 Location: London
|
Have you tried this?
Buy Order: Order type: Stop Limit or Stop Price: Ref(H,-1)
Sell Short Order: Order type: Stop Limit or Stop Price: Ref(L,-1)
Did you check the Trade Execution tab? New Simulation -> Next -> Next -> More
Uncheck Realistic Market Prices All dropdown boxes should have "Open" as the value Delay order opening 0 bars
Do you get a lot of cancelled orders as shown in the Orders Report?
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 3/19/2012(UTC) Posts: 13
|
Hi....thanks for the input.
It may be a roundabout way, but I ended up creating indicator formulas and referencing those:
H>fml("yesterday.high")
and the opposite for low, so got that working...also did stop limit formula as:
max(ref(h,-1),o)
to force the entry as the higher of yesterday's high and today's open.
Thanks again for the input.
Darren
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.