| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| volume versus average https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4256 |
Page 1 of 1 |
| Author: | Dewey McG [ Sun May 17, 2015 8:44 pm ] |
| Post subject: | volume versus average |
My coding skills don't even qualify for beginner level so please forgive any stupid questions about a task that anyone else could do easily. All I want to do is add a condition to an EA that the volume must be above the session average volume before taking a signal. The only volume indicator I found that has this is the Better Volume with Session Averages. The only problem is there are several different types of volume bars. I was able to make it work but the EA runs incredibly slow. Is there a more efficient way to do this? Here is the code I came up with and the indicator I used below: And (((CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1] > CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1]) Or ((CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1] > CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1]) Or ((CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1] > CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1]) Or ((CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1] > CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1]) Or ((CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1] > CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1]) Or (CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1] > CustomIndicator( "BetterVolume 1.4 plus Session Average" , 500 , "NumberOfBars must be greater than MAPeriod" , 20 , 40 , True , 17 , 5 , 3 , 12 , 8 , 17 )[1])))))) |
|
| Author: | Lowphat [ Mon May 18, 2015 12:09 am ] |
| Post subject: | volume versus average |
you could prolly just call the built in vol and then put a ma array on it. ill post some code when i get time unless someone beats me to it |
|
| Author: | Lowphat [ Mon May 18, 2015 2:04 am ] |
| Post subject: | volume versus average |
hmm going try to embed the session into the EA so we don't have to use the indicator at all could limit the check to every few mins instead of tick also. you will prolly have to tweak this abit but its a start add externs to the EA Code: Select all Code: Select all functions to add outside of start/tick loop Code: Select all Code: Select all Code: Select all |
|
| Author: | Dewey McG [ Mon May 18, 2015 1:06 pm ] |
| Post subject: | volume versus average |
Thanks. I will try to embed this as you suggested and see if I can make it work. |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|