Big Tick 2
0 Views
0 Downloads
0 Favorites
Big Tick 2
#property indicator_chart_window

extern int ticksizeA=1; 
extern int ticksizeB=2;

string ArrowName;
double price, lastprice;
int init () {
lastprice=100000.0;
}
int start() {
price=Bid;
if(price-lastprice > ticksizeA*Point)
   {
   ArrowName=TimeCurrent();
   ObjectCreate(ArrowName, OBJ_ARROW, 0, Time[0], Bid);
   ObjectSet(ArrowName,OBJPROP_ARROWCODE,225);
   ObjectSet(ArrowName,OBJPROP_COLOR,Lime);
   }
if(lastprice-price > ticksizeA*Point)
   {
   ArrowName=TimeCurrent();
   ObjectCreate(ArrowName, OBJ_ARROW, 0, Time[0], Bid);
   ObjectSet(ArrowName,OBJPROP_ARROWCODE,226);
   ObjectSet(ArrowName,OBJPROP_COLOR,Yellow);
   }
   
if(price-lastprice > ticksizeB*Point)
   {
   ArrowName=TimeCurrent();
   ObjectCreate(ArrowName, OBJ_ARROW, 0, Time[0], Bid);
   ObjectSet(ArrowName,OBJPROP_ARROWCODE,241);
   ObjectSet(ArrowName,OBJPROP_COLOR,Aqua);
   }
if(lastprice-price > ticksizeB*Point)
   {
   ArrowName=TimeCurrent();
   ObjectCreate(ArrowName, OBJ_ARROW, 0, Time[0], Bid);
   ObjectSet(ArrowName,OBJPROP_ARROWCODE,242);
   ObjectSet(ArrowName,OBJPROP_COLOR,Orange);
   }   
lastprice=price;
return(0);
}//start

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 ---