INDICATOR WITH CANDLES

Questions about MultiCharts and user contributed studies.
chipeur_le_renard
Posts: 41
Joined: 13 Jul 2014
Has thanked: 12 times
Been thanked: 5 times

INDICATOR WITH CANDLES

Postby chipeur_le_renard » 14 Sep 2017

HI CREW


how to draw an indicator with candles

i have this one >>>

Code: Select all

Inputs:

EURUSD( Close Data1 ),
USDJPY( Close Data2 ),
GBPUSD( Close Data3 ),
USDCAD( Close Data4 ),
USDSEK( Close Data5 ),
USDCHF( Close Data6 );

Vars:

USDx(0);

USDx = 50.14348112*Power(EURUSD,(-0.576))*Power(USDJPY,0.136)*Power(GBPUSD,(-0.119))*Power(USDCAD,0.091)*Power(USDSEK,0.042)*Power(USDCHF,0.036);

Plot1 ( USDx, "USDx" ) ;


the dollar index but i need it on candles


another question.....how to put indicator on indicator ?

thx for attention and help

regards
Last edited by chipeur_le_renard on 14 Sep 2017, edited 1 time in total.

User avatar
TJ
Posts: 7266
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 992 times
Been thanked: 2063 times

Re: INDICATOR WITH CANDLES

Postby TJ » 14 Sep 2017

See post #1 and #2
viewtopic.php?t=11713

User avatar
TJ
Posts: 7266
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 992 times
Been thanked: 2063 times

Re: INDICATOR WITH CANDLES

Postby TJ » 14 Sep 2017

What is your chart resolution?

User avatar
TJ
Posts: 7266
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 992 times
Been thanked: 2063 times

Re: INDICATOR WITH CANDLES

Postby TJ » 14 Sep 2017

I have never charted dollar index.
Does it come with daily and minute OHLC data?

User avatar
TJ
Posts: 7266
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 992 times
Been thanked: 2063 times

Re: INDICATOR WITH CANDLES

Postby TJ » 14 Sep 2017

Try this:

Code: Select all

Var:

EURUSD( Close Data1 ), EURUSD.h( H, Data1 ), EURUSD.L( L, Data1 ),
USDJPY( Close Data2 ), USDJPY.h( H, Data2 ), USDJPY.L( L, Data2 ),
GBPUSD( Close Data3 ), GBPUSD.h( H, Data3 ), GBPUSD.L( L, Data3 ),
USDCAD( Close Data4 ), USDCAD.h( H, Data4 ), USDCAD.L( L, Data4 ),
USDSEK( Close Data5 ), USDSEK.h( H, Data5 ), USDSEK.L( L, Data5 ),
USDCHF( Close Data6 ),USDCHF.h( H, Data6 ),USDCHF.L( L, Data6 );

Vars:
USDx(0),
USDx.H(0),
USDx.L(0);

USDx = 50.14348112*Power(EURUSD,(-0.576))*Power(USDJPY,0.136)*Power(GBPUSD,(-0.119))*Power(USDCAD,0.091)*Power(USDSEK,0.042)*Power(USDCHF,0.036);

USDx.h = 50.14348112*Power(EURUSD.h,(-0.576))*Power(USDJPY.h, 0.136)*Power(GBPUSD.h,(-0.119))*Power(USDCAD.h,0.091)*Power(USDSEK,.h0.042)*Power(USDCHF.h,0.036);

USDx.L = 50.14348112*Power(EURUSD.L,(-0.576))*Power(USDJPY.L,0.136)*Power(GBPUSD.L,(-0.119))*Power(USDCAD.L,0.091)*Power(USDSEK.L,0.042)*Power(USDCHF.L,0.036);

Plot1 ( USDx, "USDx" ) ;
Plot2 ( USDx.h, "USDx.H" ) ;
Plot3 ( USDx.L, "USDx.L" ) ;

chipeur_le_renard
Posts: 41
Joined: 13 Jul 2014
Has thanked: 12 times
Been thanked: 5 times

Re: INDICATOR WITH CANDLES

Postby chipeur_le_renard » 15 Sep 2017

Code: Select all

Var:

EURUSD( Close Data1 ), EURUSD.h( H, Data1 ), EURUSD.L( L, Data1 ),
USDJPY( Close Data2 ), USDJPY.h( H, Data2 ), USDJPY.L( L, Data2 ),
GBPUSD( Close Data3 ), GBPUSD.h( H, Data3 ), GBPUSD.L( L, Data3 ),
USDCAD( Close Data4 ), USDCAD.h( H, Data4 ), USDCAD.L( L, Data4 ),
USDSEK( Close Data5 ), USDSEK.h( H, Data5 ), USDSEK.L( L, Data5 ),
USDCHF( Close Data6 ),USDCHF.h( H, Data6 ),USDCHF.L( L, Data6 );

Vars:
USDx(0),
USDx.H(0),
USDx.L(0);

USDx = 50.14348112*Power(EURUSD,(-0.576))*Power(USDJPY,0.136)*Power(GBPUSD,(-0.119))*Power(USDCAD,0.091)*Power(USDSEK,0.042)*Power(USDCHF,0.036);

USDx.h = 50.14348112*Power(EURUSD.h,(-0.576))*Power(USDJPY.h, 0.136)*Power(GBPUSD.h,(-0.119))*Power(USDCAD.h,0.091)*Power(USDSEK.h,0.042)*Power(USDCHF.h,0.036);

USDx.L = 50.14348112*Power(EURUSD.L,(-0.576))*Power(USDJPY.L,0.136)*Power(GBPUSD.L,(-0.119))*Power(USDCAD.L,0.091)*Power(USDSEK.L,0.042)*Power(USDCHF.L,0.036);

Plot1 ( USDx, "USDx" ) ;
Plot2 ( USDx.h, "USDx.H" ) ;
Plot3 ( USDx.L, "USDx.L" ) ;
thx TJ
... code with no error inside but it don t work just two lines on screen

interval time is 5 mn on the chart

User avatar
TJ
Posts: 7266
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 992 times
Been thanked: 2063 times

Re: INDICATOR WITH CANDLES

Postby TJ » 15 Sep 2017

thx TJ
... code with no error inside but it don t work just two lines on screen

interval time is 5 mn on the chart

If you need help,
the minimum you have to do is to post a screen shot.

chipeur_le_renard
Posts: 41
Joined: 13 Jul 2014
Has thanked: 12 times
Been thanked: 5 times

Re: INDICATOR WITH CANDLES

Postby chipeur_le_renard » 15 Sep 2017

Image

first code...


Image

your code...

User avatar
TJ
Posts: 7266
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 992 times
Been thanked: 2063 times

Re: INDICATOR WITH CANDLES

Postby TJ » 15 Sep 2017

I have no dollar index data feed, I have no way of testing it.
Maybe someone else can help.

chipeur_le_renard
Posts: 41
Joined: 13 Jul 2014
Has thanked: 12 times
Been thanked: 5 times

Re: INDICATOR WITH CANDLES

Postby chipeur_le_renard » 19 Sep 2017

if i try close of data1.....wrong expression.. how to have close of dataX in a variable ??
thx

User avatar
Smoky
Posts: 421
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 68 times
Been thanked: 105 times

Re: INDICATOR WITH CANDLES

Postby Smoky » 19 Sep 2017

Code: Select all

Vars: intrabarpersist Close_Data2(0);

Close_Data2 = Close data2;

chipeur_le_renard
Posts: 41
Joined: 13 Jul 2014
Has thanked: 12 times
Been thanked: 5 times

Re: INDICATOR WITH CANDLES

Postby chipeur_le_renard » 20 Sep 2017

thx smoky

i write this indicator now and i come back in few days

regards

User avatar
Smoky
Posts: 421
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 68 times
Been thanked: 105 times

Re: INDICATOR WITH CANDLES

Postby Smoky » 20 Sep 2017

De rien ...


Return to “MultiCharts”