Click here to Login





                                                   ATR stop in chart

Back to threads - Tags: --
  0

0
Barbecue
2016-02-29 21:57:00


Hi !
How can I plot an ATR stop using points ?

I want to get this to the chart: SetSimStop(_StopLoss, _Point, ops0 * atr(ops1), 1);

Thanks !



QuantShare
2016-03-01 02:59:49

  0

This is to place a stop in a strategy, you cannot use it in a chart.


Barbecue
2016-03-01 06:09:12

  0

What I want to do is to draw the ATR stop line in the chart. I want to see the ATR stop line.

What is the proper way to code it ?

I was trying this but it doesn't match stop exits from the system:

today = close;
yesterday = today[1];
a = 3 * Atr(9);
b = yesterday - a;
Plot(b, "ATR_STOP", colorRed, chartLine, StyleDashed);

Thanks !



QuantShare
2016-03-02 08:45:32

  0

Best Answer
It doesn't match because the calculation is based on the entry price.

a = [entry price] - 3*atr(9); // Entry price must be hard coded. Example: 10.2 - 3*atr(9)
plot(a, "");



Barbecue
2016-03-02 13:11:18

  0

Thank you, that's what I was looking for.

It would be great for troubleshooting backtesting to have the ATR stop line charted for each trade.

Is there a way to see for each stock added to a Porfolio plugin the current value of the stop loss ?

Thanks !



QuantShare
2016-03-03 02:41:09

  0

Yes, there is.

Right click on the table in the "Open Positions" tab:

- You can add the $ amount until the stop is hit by selecting "Update Columns" then checking "$ To Stop"
- You can display the ATR stop value by selecting "Add Formula Columns" then adding the following formula:
[PRICE] - 3*atr(9)

// NB: Do not update [PRICE], keep it like that, it will be replaced automatically with the correct entry price.



Barbecue
2016-03-03 09:10:45

  0

Thank you !


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
ATR - Average True Range Drawing Tool
Chart Pattern Indicator
Year over Year Chart Indicator
ATR Trailing Indicator
Drawdown and Rate of Return On Your Chart

How-to Lessons
How to display two stocks on the same chart
How to print a chart
How to display notes/commentaries on a chart
How to create a hatched area in a chart
How to scale and move the chart Y-axis

Related Forum Threads
Profit loss protection trailing stop line on chart .
ATR stop and MM
Trailling Stop with 2XATR
Chart Pattern Index problem
Multiple symbols on the same chart

Blog Posts
Adding Trading Indicators and Formulas to a Chart
A simple but useful way to display distances in a chart
How to Backtest a Strategy from a Chart
Custom Shortcuts - Move a Chart to Display the Last Quotes/Data
Update Chart Layout based on Active Time Frame









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.