Price Data Components
Miscellaneous
0
Views
0
Downloads
0
Favorites
Rabbit_v04_11_13
// Rabbit v04.11.13
#property copyright "Jon Katana"
#property indicator_buffers 2
#property indicator_chart_window
double H[],L[],M,R,S;
extern bool SubLevels=false;
extern int Yesterday=0,Levels=22,FontSize=14;
extern color FontColor=Black,LineColor=DeepSkyBlue;
int i,z;
int init()
{SetIndexBuffer(0,H);
SetIndexStyle(0,DRAW_NONE);
SetIndexBuffer(1,L);
SetIndexStyle(1,DRAW_NONE);
return(0);}
int start()
{H[i]=iHigh(NULL,PERIOD_D1,Yesterday+1);
L[i]=iLow(NULL,PERIOD_D1,Yesterday+1);
S=(H[0]-L[0])*0.236;
{ObjectCreate("S",OBJ_LABEL,0,0,0);
ObjectSet("S",OBJPROP_XDISTANCE,5);
ObjectSet("S",OBJPROP_YDISTANCE,MathCeil(1.5*FontSize));
ObjectSetText("S","Step = "+DoubleToStr(S,Digits),FontSize,"Arial",FontColor);}
for(z=0;z<Levels*2;z++)
{R=L[0]+(H[0]-L[0])*(0.618-Levels*0.236)+S*z;
{ObjectCreate("R"+z,OBJ_TEXT,0,Time[20],R);
ObjectSetText("R"+z,DoubleToStr(R,Digits),FontSize,"Arial",FontColor);}
{ObjectCreate("R Line"+z,OBJ_HLINE,0,Time[0],R);
ObjectSet("R Line"+z,OBJPROP_COLOR,LineColor);}}
if (SubLevels==true)
{for(z=0;z<(Levels*2);z++)
{M=L[0]+(H[0]-L[0])*(0.618-Levels*0.236)+S*z+0.5*S;
{ObjectCreate("M"+z,OBJ_TEXT,0,Time[20],M);
ObjectSetText("M"+z,DoubleToStr(M,Digits),FontSize,"Arial",FontColor);}
{ObjectCreate("M Line"+z,OBJ_HLINE,0,Time[0],M);
ObjectSet("M Line"+z,OBJPROP_COLOR,LineColor);
ObjectSet("M Line"+z,OBJPROP_STYLE,3);}}
return(0);}}
int deinit()
{for(z=0;z<Levels*2;z++)
{ObjectDelete("S");
ObjectDelete("R"+z);
ObjectDelete("M"+z);
ObjectDelete("R Line"+z);
ObjectDelete("M Line"+z);}
return(0);}
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---