v15
- Change the time settings in the 'Zone' to be able to create correct zones for higher timeframes, the current timeframe and lower timeframes
- The replaced zone can now be multiple zones
- The colors of the zones are now different for bullish/bearish zones and not 'new', 'replaced' and 'broken' zones
Updated:
Interactions(zones, settings)
Creates an order block if one is found according to the settings parameter.
Parameters:
zones (array<Zone>)
settings (Settings): set all values in this parameter to define the settings for the order block creation.
Zone
Holds the values for visuals for the zone and to handle interactions (retests, false breakouts and breakouts).
Fields:
BaseTimeClose (series int): The time close for the start of the zone.
FoundTimeClose (series int): The time close for the zone when it's found.
ChartBaseTime (series int): The time for the start of the zone according to the chart bar.
High (series float): The maximimum price of the zone.
Low (series float): The minimum price of the zone.
ReactionLimit (series float): Set a factor (%) of the Average True Range (of length 14) that the total reaction must have.
TouchedZone (Zone type from mickes/Touched/14): Zone object that will be created and sent to the library 'Touched'.
Visual (Visual): An object that holds the visual elements for the zone.
SourceTimeframeSeconds (series int)
Type (series int): Defines if the found zone is bullish (1) or bearish (-1).
LatestRetestBarIndex (series int)
LatestFalseBreakoutBarIndex (series int)
LatestBreakoutBarIndex (series int)
BarIndex (series int)
Removed (series bool)
Zones
Holds the values for the charts zones.
Fields:
Index (series int): The current index to use when a new zone appears. This is changed when a new zone appears.
Maximum (series int): The maximum number of zones to show.
Zones (array<Zone>): The currently active zones.
Removes (array<Zone>): Reprsents the zones that will be replaced.
Settings
The settings for the creation of order blocks. You will need to set all the containing values in here.
Fields:
TakeOut (series bool): Set to true if you want the base candle of the order block to have to be highet or lower (take out) then the previous candle.
ReactionFactor (series float): Set the factor (%) of the Average True Range (of length 14) that the total reaction must have.
Type (series string): The type of the order block. Can be "Both", "Bullish" or "Bearish".
ConsecutiveRisingOrFalling (series bool): Set to true if you want the 3 candles in the reaction to be consecutivly rising or falling.
FairValueGap (series bool): Set to true if the last and the 3rd (base) candles wicks to don't overlap and create a so called fair value gap or an imbalance.
MaximumZones (series int): Define the maximum of active order blocks.
KeepHistoryZones (series bool): Set to true if you want removed (replaced or broken) zones to be drawn.
Bull (series color): The color of bullish order blocks.
Bear (series color): The color of bearish order blocks.
ShowReaction (series bool): Set if a line should be drawn at the reaction limit.
RemoveBrokenZones (series bool): Enable to remove broken order blocks.
CreateCreationZone (series bool): Set to true if you want a box with a border to be drawn at the creation of the zone. This is usefull when the order blocks come from a higher timeframe, but not from a lower. If this is false the 'Draw()' function will start at 'time - time_close'.
AlertRetests (series bool): Enable if you want alerts to fire when the 'Touched' library signals that a retest of the order block has occured.
AlertFalseBreakouts (series bool): Enable if you want alerts to fire when the 'Touched' library signals that a false breakout of the order block has occured.
AlertBreakouts (series bool): Enable if you want alerts to fire when the 'Touched' library signals that a breakout of the order block has occured.
AlertMessageFormat (series string): Set the format of the fired alert uppon 'Touched' library signals. Need to be in the format of '{0} on order block from ...' where '{0}' is replaced with 'retest', 'false breakout' or 'breakout'.
KeepHistoryLabels (series bool): Set if labels should be kept on historical zones and not only active zones.