Pimp your Sierra with R - Sierra Chart | futures io social day trading
futures io futures trading


Pimp your Sierra with R
Updated: Views / Replies:1,108 / 3
Created: by puma Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Pimp your Sierra with R

  #1 (permalink)
Rristocrat
zurich
 
Futures Experience: Advanced
Platform: Sierra ahRrrr CQG ...
Favorite Futures: Bund, ES, ...
 
puma's Avatar
 
Posts: 963 since Aug 2010
Thanks: 7,268 given, 1,489 received

Pimp your Sierra with R

One can use R and data from e.g quandl.com to feed sierra (EoD).

This way you can turn your little Sierra into an economics machine.
(fuck you Bloomberg ! )

Here is an example/template for the Baltic Dry Index.

(I am not a coder - so feel free to better this embarrassing script)

 
Code
### Baltic Dry Index
### via quandl
### v0.1 share 

###    ----
# 
# 
#_____________________________________________________________________________

### Meta data    ----
name1 <- "bender is great"
stamp.date <- Sys.Date()
description <- "Baltic Dry Index. Source: DryShips Inc." 
# 
#______________________________________________________________________________

### set variables   ----
quandl.auth <- 'GetThisFromYourQuandlAccount' #https://www.quandl.com
quandl.symbol <- "OFDP/INDEX_BDI_1"
path.to.sierra.data <- "F:/Programme/aaaa Trading/SierraChart5/Data/r.BDI.dly"

#_____________________________________________________________________________

### Libraries     -------------------------------------------------------------
library("Quandl")
library("xts")
library("sqldf")
#______________________________________________________________________________

### Auth for Quandl   ----
Quandl.auth(quandl.auth)
# 
#_____________________________________________________________________________

### DL from quandl  ------------------------------------------------------------
d = Quandl(quandl.symbol, 
               collapse=NULL, # NULL for Daily
               start_date="1900-01-01", 
               type="xts")

#plot(qdata[,1])
#______________________________________________________________________________

### opti data for sierra   ----

# convert xts 2 df
d.df <- as.data.frame(d)
rn <- row.names(d.df)

# opti Date 
rn <- sapply(rn, 
               function(x) 
                       {as.character(gsub("-","/", as.character(x)))})

# write back opti row names
row.names(d.df) <- rn

# make pseudo OHLC
d.df[,2] <- d.df[,1]
d.df[,3] <- d.df[,1]
d.df[,4] <- d.df[,1]
d.df[,5] <- d.df[,1]
d.df[,1] <- rn

# rename col
names(d.df) <- c("Date","Open","High","Low","Close")

#_____________________________________________________________________________

### merge with data in (txt-) DB ----
# this preserves the data downloaded earlier - 
# in case there is more data in local DB, than in the web-source

# get downloaded quandl data
d_DL <- d.df
rm(d.df)

# get current data in DB 
if (file.exists(path.to.sierra.data)){
        
        d_DB <- read.table(path.to.sierra.data,
                           header=T,
                           sep=",",
                           colClasses=c("character","numeric","numeric","numeric",
                                        "numeric"))
        d_DB[,1] <- sapply(d_DB[,1], 
                           function(x) 
                           {as.character(gsub("-","/", as.character(x)))})
} else {
        
        d_DB <- d_DL  
}

# Only the rows which are NOT in both data frames:
d_update <- sqldf('SELECT * FROM d_DL EXCEPT SELECT * FROM d_DB')

# merge into updated DB
d_DBnew <- merge(d_update, d_DB, all.x=T, all=T) 
rm(d_DB)
rm(d_DL)
rm(d_update)

#_____________________________________________________________________________

### write to file   ----
write.table(d_DBnew,path.to.sierra.data,sep=",",row.names=FALSE, quote=F)
#_____________________________________________________________________________

### clean   ----
rm(list=ls())
#_____________________________________________________________________________

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 6 users say Thank You to puma for this post:
 
  #2 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,351 given, 83,223 received

I believe @Nicolas11 also posted a lot of R/Sierra code for manipulating data.

https://futures.io/elite-trading-journals/18965-nicolas-trading-journal.html

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
  #3 (permalink)
Rristocrat
zurich
 
Futures Experience: Advanced
Platform: Sierra ahRrrr CQG ...
Favorite Futures: Bund, ES, ...
 
puma's Avatar
 
Posts: 963 since Aug 2010
Thanks: 7,268 given, 1,489 received



Big Mike View Post
I believe @Nicolas11 also posted a lot of R/Sierra code for manipulating data.

https://futures.io/elite-trading-journals/18965-nicolas-trading-journal.html

Mike

TY , I will have a look

Reply With Quote
 
  #4 (permalink)
Rristocrat
zurich
 
Futures Experience: Advanced
Platform: Sierra ahRrrr CQG ...
Favorite Futures: Bund, ES, ...
 
puma's Avatar
 
Posts: 963 since Aug 2010
Thanks: 7,268 given, 1,489 received

quandl changed the symbol to:

OFDP/INDEX_BDI

Reply With Quote

Reply



futures io > > > > Pimp your Sierra with R

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sierra charts and IB - order not cancelled in Sierra deepgreen Sierra Chart 5 December 22nd, 2013 10:08 AM
Using Sierra and Ninja together calitrader Sierra Chart 1 April 26th, 2013 11:04 PM
Sierra and its issues... arnie Sierra Chart 6 September 30th, 2012 07:39 AM
Pimp My Strat! MXASJ The Elite Circle 53 August 19th, 2011 02:44 PM
Any Sierra Programmers around? tomb06 Sierra Chart Programming 6 July 13th, 2011 10:38 AM


All times are GMT -4. The time now is 05:00 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-13 in 0.08 seconds with 19 queries on phoenix via your IP 54.90.92.204