Click here to Login





                                                   IntraDay Returns (15mins Timeframe)

  0

0
ose
2015-09-03 10:43:40


Hi Everyone,

I am still in my trial period. However I seem to be having problems with a formula I have created.

I have created the below formula, but when loaded on the chart, it seems incorrect, as it does not look like the normal chart of returns I would load on say FreeStockCharts.com.

The lines/bars of the two symbols are always so close to each other even though this is not the true reflection.

symbol1 = 'OXY';
symbol2 = 'HES';

cur1 = GetSeries(symbol1, Close);
prev1 = ref(cur1,1);
cur2 = GetSeries(symbol2, Close);
prev2 = ref(cur2,1);

return1 = (cur1 - prev1)/prev1*100;
return2 = (cur2 - prev2)/prev2*100;

// return1 = (cur1/prev1)-1;
// return2 = (cur2/prev2)-1;

plot(return2, symbol2, colorRed); // Plot standard deviation in blue
plot(return1, symbol1, colorBlue); // Plot standard deviation in blue



Any ideas?

Ose



QuantShare
2015-09-04 03:10:32

  0

Hi Ose,

There are no problems with the formula, it is displaying exactly what it is supposed to display. You can make the calculation manually to check.

What you are calculating and displaying is this the one-bar performance.
return1 = (cur1 - prev1)/prev1*100;

is equivalent to:

return1 = perf(cur1, 1);



ose
2015-09-04 04:05:11

  0

OK thanks. I actually didn't know there was already a function for performance.

Thanks
Ose



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
Price at a specific Intraday Time
Intraday Data for US Stocks
Intraday Historical Data - Alphavantage
Intraday Trading System with Daily Ranking
Historical Intraday Data for U.S. Stocks

How-to Lessons
How to speed up watchlist and screener plug-ins when working with...
How to hide a trading indicator from a particular time frame
How to plot news on a chart?
How to debug a downloader
How to detect stocks trading near all time highs

Related Forum Threads
15 min intraday
Futures Intraday data not displaying
Support of Intraday data in Ranking System Mgr
Historical intraday data limited on chart
How to export intraday data

Blog Posts
How to Backtest an Intraday Stock Trading System with EOD Ranking
6 New Ways to Download Free Intraday Data for the U.S. Stock Mark...
How to Adjust the Time Displayed in your Intraday Charts
Using Average True Range to Measure Intraday Volatility
Backtesting trading strategies using intraday data









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.