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
Trade-Ideas Intraday Screener
Maximum Intraday System Drawdown
Historical Intraday Data for U.S. Stocks
Brent and Crude Oil Continuous Futures Contracts - Intraday Data

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 download new quotes when selecting a chart
How to display notes/commentaries on a chart
How to export trading data to a CSV file

Related Forum Threads
DOWNLOADING INTRADAY DATA
Previous day high and low in in intraday chart
Intraday data outside range
Intraday Volume Discrepancies
Ranking System & Portfolio Intraday or Realtime data support

Blog Posts
How to Backtest an Intraday Stock Trading System with EOD Ranking
Day Trading: A trading system that combines intraday and EOD data
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.