Difference between revisions of "Text New bn"

From MultiCharts
Jump to navigation Jump to search
(Created page with "Displays a text object, consisting of the specified string expression located at the specified bar and specified price value, on the chart that the study is based on. Text_New...")
 
 
Line 15: Line 15:
 
Place, on the chart that the study is based on, the text "UpT" at the top of a bar number 100 if the Open price has increased incrementally over the last three bars:
 
Place, on the chart that the study is based on, the text "UpT" at the top of a bar number 100 if the Open price has increased incrementally over the last three bars:
 
<syntaxhighlight>
 
<syntaxhighlight>
If Open > Open[1] And Open[1] > Open[2] Then
+
If Open>Open[1] And Open[1]>Open[2] Then
Value1=Text_New(100, High, "UpT");
+
Value1=Text_New_BN(currentbar,High,"UpT");  
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
[[Category: Text Drawing]]
 
[[Category: Text Drawing]]

Latest revision as of 10:56, 14 July 2020

Displays a text object, consisting of the specified string expression located at the specified bar and specified price value, on the chart that the study is based on. Text_New returns an object-specific ID number, required to (further) modify the object.

Usage

text_new_bn(barnumber, price, text);

Parameters

  • Barnumber – a numerical expression specifying number of the bar at which the object is to be placed;
  • Price - a numerical expression specifying the price value (vertical position, corresponding to a value on the price scale of a chart), where the object is to be placed.
  • Text - the string expression to be displayed.

Example

Place, on the chart that the study is based on, the text "UpT" at the top of a bar number 100 if the Open price has increased incrementally over the last three bars:

If Open>Open[1] And Open[1]>Open[2] Then
Value1=Text_New_BN(currentbar,High,"UpT");