13.06.2020 13.41

Algorithmic Trading with NinjaTrader


? line 637 seems defines a variable, but what in "PlotBrushes[0][0]" is being addressed with the value "Brushes.Transparent"

? though reading summary of PlotBrushes, still not sure
** what PlotBruhes does for me

? what is in the 1st [0]
* my guess is this is an array with the name 0

? what is in the 2nd [0]
* my guess is this is the index for that array

* my guess is its about to write "Brushes.Transparent" at index 0, in array with name 0
* ? but would then array 0 be created in "PlotBrushes[0][0]"

  • Yuri Zolotarev
    13.06.2020 14:43


    You can have multiple plots in a strategy or indicator class. So its like an array of plots, same as Values, Closes etc.

    You first address the plot which you want to work with and then indicate how many bars ago you want to set the brush color.

    So this command sets brush color to be transparent at bars ago 0.

  • Frank
    13.06.2020 17:52

    k ya tx, was assuming.

    is PlotBrushes[0][0] array (1st [0]) initiated here in line 637 or somewhere else in my code ? Bcause can't find another text in the script for where the PlotBrushes[0] array was created.

  • Yuri Zolotarev
    13.06.2020 19:23

    Remember you created plots in the State.Configured?


    It is referring to the Plot brushes of these plots.