LondonKillZone TPL

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 3

//+------------------------------------------------------------------+

//| London Kill Zone |

//| MetaTrader 5, Build XXXX |

//| |

//+------------------------------------------------------------------+

#property copyright "Your Name"

#property link "https://www.yourwebsite.com"

#property version "1.0"

#property description "London Kill Zone Template"

// --- Chart Settings

#property chart_scale 1

#property chart_color_border Silver

#property chart_color_cross 0

#property chart_color_grid DimGray

#property chart_show_ask_line true

#property chart_show_bid_line true

#property chart_show_last_price true

#property chart_show_period_separators true

#property chart_show_trade_levels true

#property chart_show_orders true

#property chart_show_ohlc true

#property chart_show_one_click true

#property chart_allow_drawing true


// --- London Kill Zone Settings

input int LondonOpenHour = 8;

input int LondonOpenMinute = 0;

input int LondonCloseHour = 10;

input int LondonCloseMinute = 0;

//+------------------------------------------------------------------+

//| Expert initialization function |

//+------------------------------------------------------------------+

int OnInit()

// Draw vertical lines to mark the London Kill Zone

datetime londonOpenTime = iTime(_Symbol, PERIOD_D1, 0) + LondonOpenHour * 3600 +


LondonOpenMinute * 60;

datetime londonCloseTime = iTime(_Symbol, PERIOD_D1, 0) + LondonCloseHour * 3600 +


LondonCloseMinute * 60;

ObjectCreate(0, "LondonOpenLine", OBJ_TREND, 0, londonOpenTime, 0, londonOpenTime, 0);

ObjectSetInteger(0, "LondonOpenLine", OBJPROP_COLOR, clrGreen);

ObjectCreate(0, "LondonCloseLine", OBJ_TREND, 0, londonCloseTime, 0, londonCloseTime, 0);

ObjectSetInteger(0, "LondonCloseLine", OBJPROP_COLOR, clrRed);

return(INIT_SUCCEEDED);

}
//+------------------------------------------------------------------+

//| Expert tick function |

//+------------------------------------------------------------------+

void OnTick()

// Add your trading logic here

//+------------------------------------------------------------------+

//| Expert deinitialization function |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

// Remove the vertical lines when the template is removed

ObjectDelete(0, "LondonOpenLine");

ObjectDelete(0, "LondonCloseLine");

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy