How do you code 3 hour bollinger band

 
Hello, I’m looking for pointers on how to code for the 3hr Bollinger bands. The 1hr, 4hr and daily bollinger bands are built in but not the 3hr
 
cjeasy:
Hello, I’m looking for pointers on how to code for the 3hr Bollinger bands. The 1hr, 4hr and daily bollinger bands are built in but not the 3hr

The BB indicator will attach to any timeframe chart, you can then set the number of periods you want it to calculate over and the deviation.

there is no coding it for a particular timeframe

 
Paul Anscombe #:

The BB indicator will attach to any timeframe chart, you can then set the number of periods you want it to calculate over and the deviation.

there is no coding it for a particular timeframe

Hi Paul, using the ibands function and testing something like iBands(“USDJPY”, PERIOD_H3, 20,2,0, PRICE_CLOSE, MODE_LOWER,0) gives me a reading of 0.0 and not the actual reading of the 3hr lower bollinger band. This is what I am trying to resolve
 
cjeasy #:
Hi Paul, using the ibands function and testing something like iBands(“USDJPY”, PERIOD_H3, 20,2,0, PRICE_CLOSE, MODE_LOWER,0) gives me a reading of 0.0 and not the actual reading of the 3hr lower bollinger band. This is what I am trying to resolve

you need to show your code - remember iBands returns a handle not a reading

 
cjeasy I’m looking for pointers on how to code for the 3hr Bollinger bands. The 1hr, 4hr and daily bollinger bands are built in but not the 3hr
cjeasy iBands(“USDJPY”, PERIOD_H3, 20,2,0, PRICE_CLOSE, MODE_LOWER,0)
  1. Paul already answered for MT5.

  2. Your posted code is MT4. Why did you post your MT4 question in the MT5 EA section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place. The moderators will likely move this thread there soon.

  3. MT4 has no three-hour timeframe. You would have to generate your own H3 array of closes (from a lower timeframe) and then use iBandsOnArray

Reason: