q-Spread
2 Views
0 Downloads
0 Favorites
q-Spread
#property copyright "Copyright © 2010, Arshed Qureshi. ArshadFX" // arshedfx@gmail.com
#property indicator_chart_window
extern bool BigDisplay = 1;
extern int   DisplaySize = 12;
extern color DisplayColor = Yellow;
extern int   Display_y   =10;
extern int   Display_x   =0;

int deinit(){Comment(""); ObjectDelete("sp"); return(0); }

int start()
   {
   double myPoint, Sp;
      
   if(Digits==5||Digits==3) {myPoint=Point*10;} else {myPoint=Point;}
   Sp=(Ask-Bid)/myPoint;
   Comment("Spread = ",Sp);
   if (BigDisplay)
      {
      Comment("");
      ObjectCreate("sp", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("sp","Spread = "+DoubleToStr(Sp,1),DisplaySize, "Arial Bold", DisplayColor);
      ObjectSet("sp", OBJPROP_CORNER, 0);
      ObjectSet("sp", OBJPROP_XDISTANCE, Display_x);
      ObjectSet("sp", OBJPROP_YDISTANCE, Display_y);       
      }
   return(0);
   }



   

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---