Click here to Login

                                                   Simple Question - drawing a line


Mark Peterson
2015-06-13 02:12:37

I'm tired of searching - how do you draw a line on an indicator. I want to draw a zero line

This does not work, but gives no errors:

Plot( 0 ,"", colorBlack, chartline, styleOwnScale);

This does not work but gives no errors:

Plot( ZeroLine ,"", colorBlack, chartline, styleOwnScale);

I realize this is an array/vector issue, but there are no declarative statements that I can find except within function code. And no examples in indicators
I have down loaded.

Mark Peterson
2015-06-13 10:19:34


It does work if you set the style to StyleHideYAxisValue. I'm sure this is obvious to some.

2015-06-17 17:13:56


You should not use "styleOwnScale" as this will plot "0" on its own axis and will be plotted at the bottom.

No more messages


No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"


Trading Items
Volume Accumulation Trend Line
High Low Chart - Drawing Item
Drawdown Line
Rate of Change Horizontal Line
Least Squares Regression Line

How-to Lessons
How to use the Fibonacci retracement drawing tool
How to copy and paste drawing tools
How to draw an horizontal segment line using QS language
How to use a custom drawing tool
How to plot support and resistance lines automatically

Related Forum Threads
Line drawing within a function
Problem drawing trend line using version 2.91
Simple money managment question
Arrow has the same properties as a trend line

Blog Posts
How to Reference Drawing Studies in QS Formulas
A simple but useful way to display distances in a chart
Custom Indicator: Accumulation Distribution Line
3 ways to rank stocks in a trading system - Simulator and Potfoli...
Programming skills are not that important

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2024
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Follow us on Google+
RSS Trading Items

Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.