//DrawTextFixed Period", "Period: " + Period + "\nInterval:" + Interval + "\nSmooth:" + Smooth + "\nStdDev: " + NumStdDev, TextPosition.BottomRight);
[FONT=Courier New][SIZE=2][COLOR=#0000ff]protected[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] OnBarUpdate()[/SIZE][/FONT] [SIZE=2][FONT=Courier New]{[/FONT][/SIZE] [FONT=Courier New][SIZE=2][COLOR=#008000]/* Print a string at the bottom right showing all the values of our user-definable parameters.[/COLOR][/SIZE][/FONT] [SIZE=2][FONT=Courier New][COLOR=#008000]The use of "\n" creates a new line in our output. */[/COLOR][/FONT][/SIZE] [COLOR=red][B][FONT=Courier New][SIZE=2]DrawTextFixed([/SIZE][/FONT][FONT=Courier New][SIZE=2]"Period"[/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2]"Period: "[/SIZE][/FONT][FONT=Courier New][SIZE=2] + Period + [/SIZE][/FONT][FONT=Courier New][SIZE=2]"\nInterval: "[/SIZE][/FONT][FONT=Courier New][SIZE=2] + Interval + [/SIZE][/FONT][FONT=Courier New][SIZE=2]"\nSmooth: "[/SIZE][/FONT][FONT=Courier New][SIZE=2] + Smooth + [/SIZE][/FONT][FONT=Courier New][SIZE=2]"\nStdDev: "[/SIZE][/FONT][FONT=Courier New][SIZE=2] + NumStdDev, TextPosition.BottomRight);[/SIZE][/FONT][/B][/COLOR] [SIZE=2][FONT=Courier New]}[/FONT][/SIZE] [FONT=Courier New][SIZE=2][COLOR=#008000]// In order to trim the indicator's label we need to override the ToString() method.[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] ToString()[/SIZE][/FONT] [SIZE=2][FONT=Courier New]{[/FONT][/SIZE] [FONT=Courier New][SIZE=2][COLOR=#008000]/* We return a label consisting of only the parameters we want to include. If we did not[/COLOR][/SIZE][/FONT] [SIZE=2][FONT=Courier New][COLOR=#008000]override this method we would have a label with all four parameters. In this example we will[/COLOR][/FONT][/SIZE] [SIZE=2][FONT=Courier New][COLOR=#008000]be left with only the parameters "Period" and "Interval". */[/COLOR][/FONT][/SIZE] [FONT=Courier New][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] Name + [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]"("[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] + Period + [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]","[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] + Interval + [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]")"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2];[/SIZE][/FONT] [SIZE=2][FONT=Courier New]}[/FONT][/SIZE]
Comment