Click here to Login





                                                   how to add buy condition when the color change

  0

0
srishail
2019-10-05 13:14:47


Hi guru,

Need help in adding buy and sell condition
For example-Below is formula
a=ema(14);
b=rsi(14);
c=(-a-b)/20;
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.

Regards
srishaill



QuantShare
2019-10-09 10:08:35

  0

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

a=ema(14);
b=rsi(14);
c=(-a-b)/20;
sell = c>-570.1;

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



No more messages
0




Reply:

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"










QuantShare

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...
Fundamental analysis: How to track economic indicators in the For...
How to measure market strength with the composite tool
How to Select the Best Market Indicator for your Trading System
How to download the history of dividend payments for stocks in th...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
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.