Reading Assignment: Pinescript

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

Returns the value of the operator at previous candle.

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

Adds an input to script.

What does the Strategy function do?

Sets a number of strategies when constructing one.

What information does the Volume variable contain?

Current bar volume

1 Like

1.The brackets [ ] check previous bars or candle-sticks in this exercise, writing systems in Pine.

2.Allows for another string of data to be placed in the code

3.Strategy function commands the certain action given parameters are set before

4.Contains the buy and sell volume of that variable

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

It references a previous numerical value of the serie we are considering
ex: [ 3 ] it means 3 bars before the one we are considering

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

It adds an input of data to a script indicator

  1. What does the Strategy function do?
    It reveals the parameters for the strategy so that the system can execute the code with our input giving conditions to enter or exit the market

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

1 Like

[ ] Access past values

Input Function: Adds inputs to an indicator
Strategy Function: Describes the parameters of the entry/exit triggers.
Volume Variable: Indicates values/numerical positions especially as it referrers to candles.

1 Like

1- query the Candele / past or previous …
2- provide the interface
3- sets of strategies
4- It contains the current bar volume of trades.

1 Like
  1. What does the language operator [] do? (Hint: It’s not for regular arrays)
    The [] operator returns a value of the series form.
    Values of the form series are ones that:
  • change during the script execution
    • store a sequence of historical values associated with bars of the main chart’s symbol
    • can be accessed using the [] operator. Note that only the last value in the series, i.e., the one associated with the current bar, is available for both reading and writing
      Examples of built-in series variables are: open , high , low , close , volume and time close[1] refers to the closing candle ov previous time frame​​​​​​​
  1. What does the input function do? (Hint: Try it in Tradingview)
    The input annotation function makes it possible for script users to modify selected values which the script can then use in its calculation or logic, without the need to modify the script’s code. Specific widgets are supplied in the Settings/Inputs dialog box for each type of input​​​​​​​

  2. What does the Strategy function do?
    A strategy is a Pine script that can send, modify and cancel buy/sell orders . Strategies allow you to perform backtesting (emulation of a strategy trading on historical data) and forwardtesting (emulation of a strategy trading on real-time data) according to your algorithms.

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

1 Like
  1. [] is a series subscript that provides access to previous values of a series of data.
  2. Input Function adds an input to the script editor.
  3. Strategy Function sets up a number of different strategy properties.
  4. Holds the current bar volume (buy/sell totals). Previous volume can be accessed by the language operator [].
1 Like

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

It is used to fetch previous values of the series, by taking a numerical.

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

It enables adding inputs to script indicators.

3. What does the Strategy function do?

A function to set a range of properties concerning the execution of a trading strategy.

4. What information does the Volume variable contain?

The current bar volume and previous volume and previous volume bar data via [].

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

it indicates a reference to the previous bar from the current bar.

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

They close and enter positions in the market.

  1. What does the Strategy function do?

It’s a command to enter a market position or exit a position.

  1. What information does the Volume variable contain?

the volume that was traded on a specific candle or block.

1 Like
  1. Provide access to the previous specific value of series that then we want to use
  2. add an input in the script editor
    3)It set a number of strategy properties
  3. It indicate the volume of the bar for example
1 Like
  1. Indicates the number of candles to lookback on
  2. Requests user input; provides user input aside from default value
  3. Enters or exits a position based on the strategy script
  4. Volume on a specific candle
1 Like
  1. Accesses the previous values of the price.

  2. Adds a new input.

  3. Sets properties for the strategy.

  4. The value of the current volume bar.

1 Like

Lesson 5: Reading Assignment PineScript

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

It lets you query the values (price) of the number of previous candles indicated between the brackets.

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

The input function is some kind of an interface that allows you to add an input variable to your script indicator.

  1. What information does the Volume variable contain?

The Volume Variable contains the volume of trades (buy/sell totals) for the current bar. The previous volumes can be accessed by using the language operator [].

1 Like

Forgot this one:

What does the Strategy function do?

The strategy function allows you to execute a strategy based on previous data so you can gauge how profitable a strategy was.

1 Like
  1. What does the language operator [] do? (Hint: It’s not for regular arrays)
    Provides access to previous values like [1] previous candle
  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?
    it is used for back testing
  4. What information does the Volume variable contain?
    buy/sell volume for current bar
1 Like
  1. What does the language operator [] do? (Hint: It’s not for regular arrays)
  2. What does the input function do? (Hint: Try it in Tradingview)
  3. What does the Strategy function do?
  4. What information does the Volume variable contain?

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

2- Adds new input.

3- adds parameters to the script

4- Gives information of the current bar volume

1 Like
  1. The []` operator makes it possible to refer to historical values of any variable of the series.

  2. The input function provides an interface so you can edit the variable value via script settings. It also allows you to set the default values where applicable.

  3. The Strategy functions sets a number of strategy properties so that the system can execute the code desired.

  4. The Volume variable contains the total amount traded on the current candle. The previous candle’s volume can also be accessed by using [ ] e.g. volume[1]

1 Like

Pinescript - Reading Assignment

1 The language operator [] is a series subscript that provide access to previous values of series. expr1.expr2 is the number of bars back and must be a numerical floats. It will be rounded down to expr1[expr2]

2 Input function makes it possible for script users to modify selected values which the script can then use in its logic, without the need to modify the script code.

3 Strategy function let you send, modify and cancel buy/sell orders. It allows you to backtesting (emulating historical data) and forward testing (emulating of strategy trading in real-time) according to your algorithm.

4 The information the volume variable contain is the current value of trades (buy/sell). It can also show previous buy/sell volumes of trades.

1 Like
  1. its used to take data from the past.
  2. 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. it sets up different strategy’s
  4. it contains the buy and sell volume of the current time setting
1 Like

Does anyone know of there is a platform, in which you can program trades using Pine Script or equal. It would be great to find a site so that I can copy backtested programs from Tradingview Pine Script into say CFi . Is it possible? Any thoughts? Any platforms?

1 Like