Thank you for your note.
In order to explore the different adjustments for rectangles, I suggest opening up a test script in the Strategy Builder (Control Center > New > Strategy Builder). This is similar to the advice I provided in post #2 of this thread. Next, you can go to the conditions and actions screen and set an action to draw a rectangle. The interface will allow you to adjust things like color and opacity, and then the start/end barsAgo and Y values will determine where the different corners of the rectangle will be placed. Once you have set up the action, you can click the "View Code" button to see how the action is coded inside of the NinjaScript Editor. This code may be copied and pasted directly into the indicator you are developing.
It can also be helpful to keep the help guide page for Draw.Rectangle open and compare the code from View Code with the help guide page, as well as take note of which options you select in the Strategy Builder change which parts of the actual code. Here is the help guide section for Draw.Rectangle:
Note: using an overload with areaOpacity will allow you to set the opacity for the area of the rectangle
For more tips when getting started/getting more familiar with coding in NinjaScript, please see the link below:
Our scripting support team does not provide hands-on development or debugging assistance; please try out the described process to draw a rectangle in your indicator. If the results you are getting when testing out the indicator are unexpected, please provide an example of the code you are using as well as an explanation of how you expect it to behave so I may assist you with specific questions.
I appreciate your patience. Please don't hesitate to reach out if you encounter any unexpected behavior or have any specific questions.

Comment