Discussions
»
Product and Service Development
»
Formula Assistance
»
Help with a volume filter re Candlestick formulas in System Tester.
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 4/17/2008(UTC) Posts: 21 Location: Houston, TX
Thanks: 2 times
|
Can somebody help me with a formula that can measure the volume on day one of a candlestick signal?
I would like to test if volume on day one or day two of a Bullish engulfing pattern has any influence on the results of my EngulfingBull() statement but I don't know how to write it.
If volume on day one of a Bullish Engulfing pattern (a bearish day) is > than 110% of 21-days moving average then EngulfingBull() else 0.
How do I define volume on day one in my if() statement?
Thx,
|
|
|
|
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)
|
Try using a valuewhen() function
valuewhen(1,EngulfingBull(),V)
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 4/17/2008(UTC) Posts: 21 Location: Houston, TX
Thanks: 2 times
|
I have tried that but it doesn't solve my problem re measuring volume on day one of the EngulfingBull pattern.
ValueWhen returns a value regardsless of which day the occurence happens just as long as it happens.
And if I add Ref() to the sentence it will take the day before day one so that doesn't work either.
ValueWhen(1, Ref(EngulfingBull(),-1),V)
|
|
|
|
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)
|
Instead of putting the EngulfingBull() function inside the Ref(), put the volume there. You are looking back to the most recent occurance of the Engulfing Bull pattern and want the volume from one bar before the pattern was TRUE:
Valuewhen(1, EngulfingBull(), Ref(V,-1))
If you are on the bar where the Engulfing Bull pattern is occuring, you can leave out the Valuewhen() function and just put the Ref() of the volume
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Help with a volume filter re Candlestick formulas in System Tester.
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.