Click here to Login

                                                   how to add buy condition when the color change


2019-10-05 13:14:47

Hi guru,

Need help in adding buy and sell condition
For example-Below is formula
plot(c, "", colorblue, chartline, StyleOwnScale);
UpdateColor(c>-570.1000, colorpink);

how to add buy rule when the color of the line change to blue and sell when color of the line change to pink.


2019-10-09 10:08:35


The change in pink happens when c>-570.1 so the rule would be:

sell = c>-570.1;

For the buy, just use the opposite:
buy = !sell;

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
Trading Strategy based on the Number of Buy Signals
How far are the close prices from the support line
Top 20 stocks with the highest 10 day rate of change - Current an...
The 2 Percent Rule
Number of Times an Event Occurred in the First N-Minutes of a Tra...

How-to Lessons
How to change volume bar colors when the price closes down
How to add a metric in the trading system simulation report
How to dynamically change the number of positions in a portfolio?
How to quickly add a ticker symbol
How to download new quotes when selecting a chart

Related Forum Threads
How to define an alternate asset to buy when no positions are hel...
How can I avoid UAE prompts when launching from the QS Task Manag...
change color of Ichimoku Cloud and plot the cloud in future 26 ba...
How do I change the date format?
Change volume color based on criterion

Blog Posts
Buy the best/top rated stocks or how to create powerful rank base...
How to Select the Best Market Indicator for your Trading System
How to measure market strength with the composite tool
Fundamental analysis: How to track economic indicators in the For...
How to predict and trade the stock market using pivot points

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

Copyright 2021
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.