//---- Step 1: Define constants in your EA
#define OP_BUY_BAT            1
#define OP_SELL_BAT           2
#define OP_BUY_GARTLEY        3
#define OP_SELL_GARTLEY       4
#define OP_BUY_CRAB           5
#define OP_SELL_CRAB          6
#define OP_BUY_BUTTERFLY      7
#define OP_SELL_BUTTERFLY     8
#define OP_BUY_SHARK          9
#define OP_SELL_SHARK         10
#define OP_BUY_CYPHER         11
#define OP_SELL_CYPHER        12
#define OP_BUY_ALTERNATE_BAT  13
#define OP_SELL_ALTERNATE_BAT 14
#define OP_BUY_DEEP_CRAB      15
#define OP_SELL_DEEP_CRAB     16
#define OP_BUY_WHITE_SWAN     17
#define OP_SELL_WHITE_SWAN    18
#define OP_BUY_BLACK_SWAN     19
#define OP_SELL_BLACK_SWAN    20
#define OP_BUY_MAX_BAT        21
#define OP_SELL_MAX_BAT       25
#define OP_BUY_MAX_GARTLEY    26
#define OP_SELL_MAX_GARTLEY   27
#define OP_BUY_MAX_BUTTERFLY  28
#define OP_SELL_MAX_BUTTERFLY 29
#define OP_BUY_A_CRAB         30
#define OP_SELL_A_CRAB        31
#define OP_BUY_A_BUTTERFLY    32
#define OP_SELL_A_BUTTERFLY   33
#define OP_BUY_A_BAT          34
#define OP_SELL_A_BAT         35
#define OP_BUY_A_GARTLEY      36
#define OP_SELL_A_GARTLEY     37
#define OP_BUY_SEA_PONY       38
#define OP_SELL_SEA_PONEY     39
#define OP_BUY_ALT_SHARK      40
#define OP_SELL_ALT_SHARK     41
//---- Step 2: Read values from the signal buffer
int start()
{
// Read pattern and breakout buffer
double pattern  = iCustom(Symbol(), Period(), "PZ_HarmonicTrading_LICENSE", 0, 1);
double breakout = iCustom(Symbol(), Period(), "PZ_HarmonicTrading_LICENSE", 1, 1);
// Do something
if(pattern == OP_BUY_BAT)        { /* Your code for bullish bat pattern */ }
if(pattern == OP_SELL_BAT)       { /* Your code for bearish bat pattern */ }
if(pattern == OP_BUY_GARTLEY)    { /* Your code for bullish gartley pattern */ }
if(pattern == OP_SELL_GARTLEY)   { /* Your code for bearish gartley pattern */ }
if(pattern == OP_BUY_CRAB)       { /* Your code for bullish crab pattern */ }
if(pattern == OP_SELL_CRAB)      { /* Your code for bearish crab pattern */ }
if(pattern == OP_BUY_BUTTERFLY)  { /* Your code for bullish butterfly pattern */ }
if(pattern == OP_SELL_BUTTERFLY) { /* Your code for bearish butterfly pattern */ }
if(pattern == OP_BUY_SHARK)      { /* Your code for bullish shark pattern */ }
if(pattern == OP_SELL_SHARK)     { /* Your code for bearish shark pattern */ }
if(pattern == OP_BUY_CYPHER)     { /* Your code for bullish cyhper pattern */ }
if(pattern == OP_SELL_CYPHER)    { /* Your code for bearish cypher pattern */ }
/* All other pattern constants above can be evaluated here too */
if(breakout == OP_BUY)           { /* Your code for bullish breakout (blue arrow) */}
if(breakout == OP_SELL)          { /* Your code for bearish breakout (red arrow) */}
if(pattern == EMPTY_VALUE && breakout == EMPTY_VALUE) { /* No pattern or breakout */}
// Exit
return(0);
}