/* Generated by EX4-TO-MQ4 decompiler V4.0.223.1a [] Website: http://purebeam.biz E-mail : purebeam@gmail.com */ #property copyright "Copyright © 2008, FOREXflash Software Corp." #property link "http://www.metaquotes.net" #property indicator_chart_window #property indicator_buffers 0 bool ShowOCLines = TRUE; int BarsCount = 1; bool ShowBarTime = false; string g_fontname_112 = "Trebuchet MS"; int g_fontsize_120 = 13; int g_color_124 = White; int g_x_128 = 15; int g_y_132 = 35; bool gi_136 = TRUE; int g_color_140 = Black; int g_fontsize_144 = 20; string g_fontname_148 = "Arial Black"; int gi_unused_156 = 1; int g_str_len_160; string gs_164 = ":...:...:...:...:"; double gd_172; double gd_180; double g_bid_220; bool gi_228 = TRUE; int time_frame = 0; int g_shift_236 = -1; string ident="vsa bet separ vH"; int init() { /*string ls_0 = "2009.07.06"; int l_str2time_8 = StrToTime(ls_0); if (TimeCurrent() >= l_str2time_8) { Alert("The trial version expired! Contact forexflash@gmail.com"); return (1); }*/ g_str_len_160 = StringLen(gs_164); IndicatorShortName("VSA© Better&TickSeparateVolumeHistogram"); return (0); } int deinit() { string name=""; for(int i=ObjectsTotal()-1;i>=0;i--) { name=ObjectName(i); if(StringFind(name,ident)!=-1) ObjectDelete(name); } return (0); } int start() { if (ShowOCLines == TRUE) OpenCloseLines(); if (ShowBarTime == TRUE) BarTime(); return (0); } int OpenCloseLines() { double h_iclose_D = iHigh(NULL, PERIOD_D1, iHighest(NULL, PERIOD_D1, MODE_HIGH, BarsCount, 1)); double h_iclose_4H = iHigh(NULL, PERIOD_H4, iHighest(NULL, PERIOD_H4, MODE_HIGH, BarsCount, 1)); double h_iclose_W1 = iHigh(NULL, PERIOD_W1, iHighest(NULL, PERIOD_W1, MODE_HIGH, BarsCount, 1)); double h_iclose_MN1 = iHigh(NULL, PERIOD_MN1, iHighest(NULL, PERIOD_MN1, MODE_HIGH, BarsCount, 1)); double h_iclose_H1 = iHigh(NULL, PERIOD_H1, iHighest(NULL, PERIOD_H1, MODE_HIGH, BarsCount, 1)); double l_iclose_D = iLow(NULL, PERIOD_D1, iLowest(NULL, PERIOD_D1, MODE_LOW, BarsCount, 1)); double l_iclose_H4 = iLow(NULL, PERIOD_H4, iLowest(NULL, PERIOD_H4, MODE_LOW, BarsCount, 1)); double l_iclose_W1 = iLow(NULL, PERIOD_W1, iLowest(NULL, PERIOD_W1, MODE_LOW, BarsCount, 1)); double l_iclose_MN1 = iLow(NULL, PERIOD_MN1, iLowest(NULL, PERIOD_MN1, MODE_LOW, BarsCount, 1)); double l_iclose_H1 = iLow(NULL, PERIOD_H1, iLowest(NULL, PERIOD_H1, MODE_LOW, BarsCount, 1)); drawLine(ident+"HH_D1", Time[3], Time[0], h_iclose_D, h_iclose_D, 2, FALSE, White, 1); drawLine(ident+"HH_H4", Time[3], Time[0], h_iclose_4H, h_iclose_4H, 2, FALSE, Lime, 1); drawLine(ident+"HH_W1", Time[3], Time[0], h_iclose_W1, h_iclose_W1, 2, FALSE, Magenta, 2); drawLine(ident+"HH_MN1", Time[3], Time[0], h_iclose_MN1, h_iclose_MN1, 2, FALSE, Red, 2); drawLine(ident+"HH_H1", Time[3], Time[0], h_iclose_H1, h_iclose_H1, 2, FALSE, Orange, 1); drawLine(ident+"LL_D1", Time[3], Time[0], l_iclose_D, l_iclose_D, 2, FALSE, White, 1); drawLine(ident+"LL_H4", Time[3], Time[0], l_iclose_H4, l_iclose_H4, 2, FALSE, Lime, 1); drawLine(ident+"LL_W1", Time[3], Time[0], l_iclose_W1, l_iclose_W1, 2, FALSE, Magenta, 2); drawLine(ident+"LL_MN1", Time[3], Time[0], l_iclose_MN1, l_iclose_MN1, 2, FALSE, Red, 2); drawLine(ident+"LL_H1", Time[3], Time[0], l_iclose_H1, l_iclose_H1, 2, FALSE, Orange, 1); drawTXTLabel(ident+"D1 Bar HC"," D-H", h_iclose_D, Time[0], White); drawTXTLabel(ident+"H4 Bar HC"," H4-H", h_iclose_4H, Time[0], White);//Print (TimeToStr(iTime(NULL,PERIOD_H4,1),TIME_MINUTES)); drawTXTLabel(ident+"W1 Bar HC"," W-H", h_iclose_W1, Time[0], White); drawTXTLabel(ident+"MN1 Bar HC"," M-H", h_iclose_MN1, Time[0], White); drawTXTLabel(ident+"H1 Bar HC"," H1-H", h_iclose_H1, Time[0], White);//Print (TimeToStr(iTime(NULL,PERIOD_H1,1),TIME_MINUTES)); drawTXTLabel(ident+"D1 Bar LC"," D-L", l_iclose_D, Time[0], White); drawTXTLabel(ident+"H4 Bar LC"," H4-L", l_iclose_H4, Time[0], White); drawTXTLabel(ident+"W1 Bar LC"," W-L", l_iclose_W1, Time[0], White); drawTXTLabel(ident+"MN1 Bar LC"," M-L", l_iclose_MN1, Time[0], White); drawTXTLabel(ident+"H1 Bar LC"," H1-L", l_iclose_H1, Time[0], White); return (0); } void drawTXTLabel(string r_name,string a_name_0, double a_price_8, int a_datetime_16, color a_color_20) { if (ObjectFind(r_name) != 0) { ObjectCreate(r_name, OBJ_TEXT, 0, a_datetime_16, a_price_8); ObjectSetText(r_name, a_name_0, 8, "Tahoma", CLR_NONE); ObjectSet(r_name, OBJPROP_COLOR, a_color_20); return; } ObjectMove(r_name, 0, a_datetime_16, a_price_8); // } void drawLine(string a_name_0, int a_datetime_8, int a_datetime_12, double a_price_16, double a_price_24, int a_width_32, int a_bool_36, color a_color_40, int ai_44) { if (ObjectFind(a_name_0) != 0) { ObjectCreate(a_name_0, OBJ_TREND, 0, a_datetime_8, a_price_16, a_datetime_12, a_price_24); if (ai_44 == 1) ObjectSet(a_name_0, OBJPROP_STYLE, STYLE_SOLID); else { if (ai_44 == 2) ObjectSet(a_name_0, OBJPROP_STYLE, STYLE_DASHDOT); else ObjectSet(a_name_0, OBJPROP_STYLE, STYLE_DOT); } ObjectSet(a_name_0, OBJPROP_COLOR, a_color_40); ObjectSet(a_name_0, OBJPROP_WIDTH, a_width_32); ObjectSet(a_name_0, OBJPROP_RAY, a_bool_36); return; } ObjectDelete(a_name_0); ObjectCreate(a_name_0, OBJ_TREND, 0, a_datetime_8, a_price_16, a_datetime_12, a_price_24); if (ai_44 == 1) ObjectSet(a_name_0, OBJPROP_STYLE, STYLE_SOLID); else { if (ai_44 == 2) ObjectSet(a_name_0, OBJPROP_STYLE, STYLE_DASHDOT); else ObjectSet(a_name_0, OBJPROP_STYLE, STYLE_DOT); } ObjectSet(a_name_0, OBJPROP_COLOR, a_color_40); ObjectSet(a_name_0, OBJPROP_WIDTH, a_width_32); ObjectSet(a_name_0, OBJPROP_RAY, a_bool_36); } void BarTime() { if (time_frame == 0) time_frame = Period(); int minutes = iTime(NULL, time_frame, 0) + 60 * time_frame - TimeCurrent(); int seconds = minutes % 60; minutes = (minutes - minutes % 60) / 60; string ls_172 = " <----" + minutes + ":" + seconds; ObjectDelete(ident+"time"); if (ObjectFind(ident+"time") != 0) { if (gi_228) { ObjectCreate(ident+"time", OBJ_TEXT, 0, Time[0], Close[0] + 0.0); ObjectsRedraw(); } if (gi_228) { ObjectSetText(ident+"time", StringSubstr(ls_172, 0), 9, "Tahoma Bold", Yellow); ObjectsRedraw(); } } else ObjectMove(ident+"time", 0, Time[0], Close[0] + 0.0005); }