Crosshairs with 2 additional Lines +/- X pips away

 

Hi everyone,

can somebody please help me building a srcipt for the Crosshairs, which shows 2 horizontal Lines +/- X pips away from price?

For example, X=20, if you move the cursor to 1.3617, there would be also a line at 1.3637 and 1.3597.

That would be a really useful tool.

Thanks a lot!

 
int start()
  {
//----
   int distance = 200;
   double   drop_price = WindowPriceOnDropped();
   datetime drop_time  = WindowTimeOnDropped();
   
   ObjectDelete("Dropped price line1");
   ObjectDelete("Dropped price line2");
   ObjectDelete("Dropped price line3");
   ObjectDelete("Dropped time line");
   //----
   ObjectCreate("Dropped price line1", OBJ_HLINE, 0, drop_time ,drop_price + (distance * Point));
   ObjectCreate("Dropped price line2", OBJ_HLINE, 0, drop_time, drop_price - (distance * Point));
   ObjectCreate("Dropped price line3", OBJ_HLINE, 0, drop_time, drop_price);
   ObjectCreate("Dropped time line", OBJ_VLINE, 0, drop_time,0);
   

//----
   return(0);
  }
 
WindowPriceOnDropped() only works when you drag something on to the chart or move something. It's not going to just follow the cursor. To follow the cursor, look thru the code base.
 

i know that, u have a better idea ?

Reason: