Click here to Login

                                                   Candle Stick Ratio Plot custom function


2018-01-09 10:57:55

I want to plot candle stick plot of a ration (eg. SPY/IWM). Can you give some suggestion on how to code a custom function to do that.


2018-01-09 11:18:10


Never mind, figured it out

c1 = getseries('IWM', close);
h1 = getseries('IWM', high);
l1 = getseries('IWM', low);
o1 = getseries('IWM', open);

c2 = getseries('SPY', close);
h2 = getseries('SPY', high);
l2 = getseries('SPY', low);
o2 = getseries('SPY', open);

PlotCandleStick1(o1/o2, h1/h2, l1/l2, c1/c2, "CandleStick", colorBlack, StyleSymbolNone) ;

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
Advanced Quotes and Custom Databases Function
Fibonacci retracement: Golden ratio
Ratio of open-close to high-low range
EURUSD Long Positions Ratio
Plot Economic Indicators on a Chart

How-to Lessons
How to plot the ratio of two stocks
How to plot put/call ratio of individual stocks
How to plot two different time frames in the same chart
How to plot arrows below/above candlesticks on a chart
How to plot a stock using different periods in the same chart

Related Forum Threads
Candle Stick % indicator
Problem with performance calculation in custom function
Custom Fitness function in Ranking System Manager
custom field value is function beta sma
Custom Fitness Function

Blog Posts
Fundamental Stock Analysis: Rank stocks based on a valuation rati...
Put-Call Ratio for Individual Stocks
Trading System Analysis: Backtesting report and custom measures
Custom Indicator: Accumulation Distribution Line
The 'inside period' function

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.