Quick help

 

//+------------------------------------------------------------------+
//| VlineTime. mq4 |
//| |
//| |
//+------------------------------------------------------------------+
#property copyright "whodat"
#property link "medat"

#property indicator_chart_window

int LonOpen=945;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
{
ObjectDelete("LonOpen");
}
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
{
ObjectCreate("LonOpen", OBJ_VLINE, 0,Time,0);
ObjectSet("LonOpen", OBJPROP_STYLE, STYLE_DASH);
ObjectSet("LonOpen", OBJPROP_COLOR, Blue);
}
//----
return(0);
}
//+------------------------------------------------------------------+ Boy am I really lost. I can't get the MQL insert function to work properly so I pasted the code and started the text afterwords. Either way, I'm new to . mql as you can tell. All I want to do with this, for now, is have a vertical line drawn at 0945 on the chart. When I apply this to a chart, nothing shows up at the 0945 bar. What am I not doing correctly with the code?

 
datetime today_begin=CurTime()/86400;
today_begin*=86400;
datetime today_0945=today_begin+9*3600+45*60;
...
ObjectCreate("LonOpen", OBJ_VLINE, 0,today_0945,0);

PS for source code use MQL button
 
stringo wrote:
datetime today_begin=CurTime()/86400;
today_begin*=86400;
datetime today_0945=today_begin+9*3600+45*60;
...
ObjectCreate("LonOpen", OBJ_VLINE, 0,today_0945,0);

PS for source code use MQL button
Reason: