Blur's Prices&Time

Download script
Author: BLUR71
Blur's Prices&Time

This script serves as a visual data overlay for your trading charts, designed to provide real-time market information and technical sentiment at a glance. Instead of forcing you to look across multiple windows or indicators, it consolidates key price levels and momentum signals directly onto your current candles.

How the Logic Works

1. Market Sentiment Analysis (Color Coding) The script continuously monitors three primary technical indicators to determine the "mood" of the market: the RSI (Relative Strength Index), the Stochastic Oscillator, and the CCI (Commodity Channel Index). It uses these to assign a dynamic color to the information displayed on your screen:

  • Bullish Sentiment (Lime Green): If the indicators suggest strong upward momentum (specifically when the RSI is high, the Stochastic is overbought, and the CCI is positive), the text turns green.
  • Bearish Sentiment (Red): If the indicators suggest a strong downward trend (low RSI, oversold Stochastic, and negative CCI), the text turns red.
  • Neutral Sentiment (Dark Orange): When the market is neither clearly bullish nor bearish, the script defaults to orange to alert you of a sideways or undecided price action.

2. Real-Time Price Display The script automatically calculates and displays three distinct pieces of information on your chart in real-time:

  • Current Time: It extracts the exact time remaining/elapsed for the current candle, allowing you to track price action relative to the timeframe.
  • Bid Price: The current price at which you can sell.
  • Ask Price: The current price at which you can buy.

To ensure these prices are clearly visible and do not overlap with your price candles, the script applies a small visual "offset" (an adjustment based on market volatility) so that the Bid and Ask labels float neatly above and below the current candle.

Summary of User Experience

When you use this script, you don't have to manually interpret complex oscillator lines. You simply look at the labels on your chart: the text tells you exactly where the prices are and how much time is left in the candle, while the color instantly communicates whether the underlying technical indicators are leaning toward a "Buy" or "Sell" environment.

Price Data Components
Series array that contains open time of each bar
Indicators Used
Stochastic oscillatorRelative strength indexCommodity channel indexIndicator of the average true range
10 Views
0 Downloads
0 Favorites
Blur's Prices&Time
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//                                             Blur's Prices&Time.mq4 //
//                                                             BLUR71 //
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
#property copyright "BLUR71"
#property link      "blrobertsjr@hotmail.com"
#property link      "www.forex-tsd.com"
#property indicator_chart_window
extern string	TextFont      = "Arial Bold Italic";
extern int	 	TextSize      = 13;
extern double  Digit3Adjust = 2.0;
extern double  Digit4Adjust = 2.0;
//----
int deinit()
{	ObjectDelete("CandleTime");
	ObjectDelete("CandleBidPrice");
	ObjectDelete("CandleAskPrice");
	return(0); }
//----
int start()
 {	int Minutes,Secs; double Adjust; string TimeOutput,BidPrice,AskPrice; color PriceColor;
   double STO = iStochastic(NULL,0,5,4,4,0,0,MODE_MAIN,0);
   double RSI = iRSI(NULL,0,5,0,0);
   double CCI = iCCI(NULL,0,6,0,0);
   if ((RSI > 60) && (STO > 70) && (CCI > 0)) PriceColor = Lime;
   if ((RSI < 40) && (STO < 30) && (CCI < 0)) PriceColor = Red;
   else PriceColor = DarkOrange;
   if (Digits<=3) Adjust = iATR(NULL,0,50,0)/(Digit3Adjust); TimeOutput="                        ";
  	if (Digits>=4) Adjust = iATR(NULL,0,50,0)/(Digit4Adjust); TimeOutput="                        ";
   BidPrice = TimeOutput+DoubleToStr(Bid,Digits);
   AskPrice = TimeOutput+DoubleToStr(Ask,Digits);
	Minutes = Time[0] + Period() * 60 - CurTime();
	Secs = Minutes % 60;
	Minutes = (Minutes - Minutes % 60) / 60;
	if(Minutes<10) TimeOutput=TimeOutput+"0";
	TimeOutput=TimeOutput+Minutes+":";
	if(Secs<0) Secs=0;
	if(Secs<10) TimeOutput=TimeOutput+"0"+Secs;
	else TimeOutput=TimeOutput+Secs+"";
   ObjectDelete("CandleTime");
   ObjectCreate("CandleTime", OBJ_TEXT, 0, Time[0], Close[0]+0.00);
   ObjectSetText("CandleTime", TimeOutput, TextSize, TextFont, PriceColor);
   ObjectDelete("CandleBidPrice");
   ObjectCreate("CandleBidPrice", OBJ_TEXT, 0, Time[0], (Close[0]-Adjust));
   ObjectSetText("CandleBidPrice", BidPrice, TextSize, TextFont, PriceColor);
   ObjectDelete("CandleAskPrice");
   ObjectCreate("CandleAskPrice", OBJ_TEXT, 0, Time[0], Close[0]+Adjust);
   ObjectSetText("CandleAskPrice", AskPrice, TextSize, TextFont, PriceColor); 
	return(0); }

Comments