Spread ratio

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Spread ratio

Postby isamegrelo » Sat Nov 04, 2017 5:45 am

Formula:



study(title="Tarzan's spread ratio indicator")

smalen = input(title = "sma length", defval=6, minval=1)
stype = input(title = "spread type 1=+ 2=- 3=/ 4=*", defval=3, minval=1)



s1 = input(title = "Security #1", defval="DX1!")
s2 = input(title = "Security #2", defval="TY1!")
tenyrnotes=s1
dollarindex=s2

notes = sma(security(tenyrnotes, "D", close) , smalen)
DX = sma(security(dollarindex, "D", close) , smalen)

DXS = (stype==1 ) ? (notes+DX) :
(stype==2 ) ? (notes-DX) :
(stype==3 ) ? (notes/DX) :
(stype==4 ) ? (notes*DX) : na


plot((DXS), color=blue)
isamegrelo
FXCodeBase: Initiate
 
Posts: 114
Joined: Mon May 29, 2017 3:36 pm

Re: Spread ratio

Postby Apprentice » Sat Nov 04, 2017 6:33 am

Your request is added to the development list under Id Number 3940
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36437
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 24 guests