Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/23/2005(UTC) Posts: 45 Location: Savannah
Was thanked: 6 time(s) in 4 post(s)
|
I'm trying write a formula so when a "set bar" occurs, the position is taken at the High (or Low) of the set up bar High / Low. I've tried: H > ValueWhen(1, Ref("setup is true",-1),H) {then enter Long} But that's not working. Any suggestions? Thanks. ....... Tom ........
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
Originally Posted by: TomHam I'm trying write a formula so when a "set bar" occurs, the position is taken at the High (or Low) of the set up bar High / Low. I've tried: H > ValueWhen(1, Ref("setup is true",-1),H) {then enter Long} But that's not working. Any suggestions? Thanks. ....... Tom ........
Hello, Are you writing this formula for the System Tester? If so, one thing to keep in mind is that the default trade execution in the System Tester is to enter a trade at the Open of the bar after your condition occurs. If you go to the System Tester and click the "Trade Options" button and then click the "Trade Execution" tab, you can uncheck "Realistic Market Prices", then adjust the Buy/Sell/Sell Short/Buy to Cover fields accordingly (i.e. set the Buy Price to High, Sell Price to Low, etc). You would also want to change the "Delay order opening" field to 0. In this case you would simply need your basic formula condition combined with the above settings to get in at the High/Low of the signal bar.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/23/2005(UTC) Posts: 45 Location: Savannah
Was thanked: 6 time(s) in 4 post(s)
|
Thanks for the reply.
I will eventually write it in the "true statement" format that System tester requires but I like to debug and see it on a chart first.
I used a work around using multiple lines of "If Then Else" logic to get it to work OK. Not elegant, but functional.
Thanks again.
|
1 user thanked TomHam for this useful post.
|
|
|
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.