Reading Assignment: Pinescript

1. What does the language operator [] do? (Hint: It's not for regular arrays)
	a. it is an operator which provides access to previous values

2. What does the input function do? (Hint: Try it in Tradingview)
	a. adds an input to the script indicator
	
3. What does the Strategy function do?
	a. sets strategy properties
	
4. What information does the Volume variable contain?
	a. volume of current bar
1 Like

1. What does the language operator [] do? It’s a series subscript that provides access to previous values of series.

2. What does the input function do? It adds an input to the script editor.

3. What does the Strategy function do? This function sets a number of strategy properties.

4. What information does the Volume variable contain? It holds the current bar volume.

A: gives access to previous data
A: gives you functions actions toenter into your script to plot
A: Gives a command on what action to do for the script
A: Previous values may be accessed with square brackets operator also current bar vol has amount of trades on the asset

  1. What does the language operator [] do? (Hint: It’s not for regular arrays)
    Series subscript. Provides access to previous values.

  2. What does the input function do? (Hint: Try it in Tradingview)
    Adds input to your script indicator.

  3. What does the Strategy function do?
    Sets a number of strategy properties.

  4. What information does the Volume variable contain?
    Current bar volume.

1 Like

1 Series subscript: integer value x inside [] is the xth bar back
2 Adds an input to the script which is like the TA indicators
3 Sets the strategy properties
4 The current bar volume, optional [ x ] gives previous x-th bar volume

  1. provides access to previous values.
  2. You can create and then edit inputs in the object tree.
  3. Performs different strategies as far as I can tell.
  4. calls the current or previous candle’s trading volumes.

1 - What does the language operator [] do? (Hint: It’s not for regular arrays)

Series subscript. Provides access to previous values of series expr1. expr2 is the number of bars back, and must be numerical. Floats will be rounded down.

2 -What does the input function do? (Hint: Try it in Tradingview)

Adds an input to your script indicator. User can see and edit inputs on the Format Object dialog of the script study. Script inputs look and behave exactly the same as inputs of built-in Technical Analysis indicators.

3 - What does the Strategy function do?

Strategy function provides a way to test/sample entering and exiting a position.

4 - What information does the Volume variable contain?

Volume variable hold the number of BUY and SELL volume for a instance in time (a candle bar).

  1. Provides access to previous values.

  2. Adds an input to your script indicator.

  3. Sets up a number of strategy properties.

  4. Contains the current bar volume. Previous bar volumes can be accessed via []

1 Like
  1. What does the language operator [] do? (Hint: It’s not for regular arrays)

Series subscript. Provides access to previous values of series expr1. expr2 is the number of bars back, and must be numerical.

  1. What does the input function do? (Hint: Try it in Tradingview)
    it adds an input to the script

  2. What does the Strategy function do?
    it sets the strategy of the trading strategy

  3. What information does the Volume variable contain?
    the bar volume

1 Like
  1. Series subscript. Provides access to previous values of series. the number provided gives the number of bars back in the series.
  2. Requests for input
  3. The actual strategy is put in
  4. Current bar volume
  1. Series subscript. Provides access to previous values of series expr1. expr2 is the number of bars back, and must be numerical. Floats will be rounded down.
    expr1[expr2]
  2. You can add variables with input in your script which acts like an indicator.
  3. With strategy you can use the past data, set properties based on your calculations and different variables part of your strategy and create the logic behind which your strategy can be applied.
  4. Variable containing the current bar volume.

1 Series subscript. Provides access to previous values of series.
2 Adds an input to your script indicator.
3 The function sets a number of strategy properties (many properties…manual necessary).
4 Current bar volume
(Previous values may be accessed with square brackets operator [], e.g. volume[1], volume[2])

1 Like
  1. What does the language operator [] do? (Hint: It’s not for regular arrays)
    Provides access to previous values of series

  2. What does the input function do? (Hint: Try it in Tradingview)
    Adds an input to your script indicator

  3. What does the Strategy function do?
    sets a number of strategy properties
    Ex : strategy(title, shorttitle, overlay, format, precision, scale, pyramiding, calc_on_order_fills, calc_on_every_tick, max_bars_back, backtest_fill_limits_assumption, default_qty_type, default_qty_value, initial_capital, currency, slippage, commission_type, commission_value, process_orders_on_close, close_entries_rule) → void

  4. What information does the Volume variable contain?

The current bar volume ( Current meaning the past data that we have integrated in our trading strategy when doing our backtest)

  1. The [ ] operator provides access to previous values in a given series, expr1[expr2], where expr2 is the number of bars back and must be a number (and likely an integer).

  2. Input adds user-input to the script for the purpose of modifying the parameters and therein the behaviour(s) of the script

  3. The strategy function (or rather a class of functions) provides market order control (open/enter, close/exit, order, risk)

  4. The volume variable provides current bar volume value.

What does the language operator [] do? (Hint: It’s not for regular arrays)
The language operator allows access to previous values of series and the number in the square brackets indicates how many previous bars in the series the value is referred to.

What does the input function do? (Hint: Try it in Tradingview)
It adds an input to your script.

What does the Strategy function do?
It sets a number of strategy properties.

What information does the Volume variable contain?
It contains the current bar volume of trades.

  1. What does the language operator [ ] do? (Hint: It’s not for regular arrays)
    Series subscript. It’s the previous values of series expr1. expr2 is the number of bars back, and must be numerical.

  2. What does the input function do? (Hint: Try it in Tradingview)
    Adds an input to your script indicator which works like editing variables - you can set min and max as well as default values

  3. What does the Strategy function do?
    Sets the selected strategy property and sets up positions for backtesting

  4. What information does the Volume variable contain?
    The traded buy/sell volume for the particular time segment as a bar.

1 Like
  1. [] provides access to previous values of a series.
  2. Input function adds an input to a script indicator, users are able to see and edit inputs on the format object dialog.
  3. It sets “strategy properties” allowing inputted data to be analyzed and backtested.
  4. It contains the current bar volume.
  1. Provides access to previous values of series.
  2. Adds an input to your script indicator.
  3. The function sets a number of strategy properties.
  4. Previous values may be accessed with square brackets operator.
  1. Gives you access to previous values of series expr1. expr2 is the number in the bracket are how far the bars go back. It must be numerical and floats will be rounded down.

  2. The input function adds data to the script

  3. The strategy function emulates entering or exiting a position for back testing.

  4. The current bar in that time frame

  1. languauge operators look like the same thing thats in javascript, add subtract, divide etc. I need to go back and really finish that course.

  2. Input functions add inputs to your script indicator.

  3. The strategy function sets a number of strategy properties.

  4. Volume variable contains the current bar volume.