Strategies coded in R - Matlab, R project and Python | futures io social day trading
futures io futures trading


Strategies coded in R
Updated: Views / Replies:3,350 / 24
Created: by donedge Attachments:4

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
 4  
 
Thread Tools Search this Thread
 

Strategies coded in R

  #11 (permalink)
Elite Member
Stockholm
 
Futures Experience: Advanced
Platform: NinjaTrader,Sierra Chart, Python
Broker/Data: IB
Favorite Futures: ES & Stocks
 
Posts: 86 since Apr 2013
Thanks: 80 given, 71 received


giladbi View Post
I tried to run your code and got an error few times
the 1st was when run:
 
Code
for(symbol in symbols)
{
  plot(chart_Series(get(symbol), name=symbol, theme=myTheme))
}
par(mfrow = c(1,1))
and got the error:

and when got to:
 
Code
rm.strat(name="multiAsset.bb1")
I got an error:

I will appriciate if anyone could asist on solving this
Thanks!

Have you installed the required packages in R?

Reply With Quote
 
  #12 (permalink)
Elite Member
tel aviv
 
Futures Experience: Advanced
Platform: Multicharts, SC
Favorite Futures: es
 
Posts: 34 since Jun 2009
Thanks: 4 given, 1 received

yes as far as i know. the only package here is quantstrat which i loaded using
 
Code
library(quantstrat)
as in your code

Reply With Quote
 
  #13 (permalink)
Elite Member
Stockholm
 
Futures Experience: Advanced
Platform: NinjaTrader,Sierra Chart, Python
Broker/Data: IB
Favorite Futures: ES & Stocks
 
Posts: 86 since Apr 2013
Thanks: 80 given, 71 received



giladbi View Post
yes as far as i know. the only package here is quantstrat which i loaded using
 
Code
library(quantstrat)
as in your code

Hello @giladbi


Here is the solution for first error:
r - Error in plot.new() : figure margins too large, Scatter plot - Stack Overflow
Just increase the plot window size in Rstudio to avoid this error.

Regarding the second error I found the explanation here:
Rmetrics - Quantstrat demos
..
You probably are missing the package "Defaults"
Index of /src/contrib/Archive/Defaults

As it is in archive I dont think it is installed automatic when you run the Quantstrat package...

Reply With Quote
 
  #14 (permalink)
Elite Member
tel aviv
 
Futures Experience: Advanced
Platform: Multicharts, SC
Favorite Futures: es
 
Posts: 34 since Jun 2009
Thanks: 4 given, 1 received

thanks @donedge
1. i changed the width using
 
Code
par(mar = c(1,1,1,1))
but than got a new error

Quoting 
Error in plot(chart_Series(get(symbol), name = symbol, theme = myTheme)) :
error in evaluating the argument 'x' in selecting a method for function 'plot': Error in .External.graphics(C_plot_window, xlim, ylim, log, asp, ...) :
invalid graphics state

this error was fixed using
Quoting 
dev.off()



2. the defults package can'tbe installed for r ver 3.03....

any more ideas?

Reply With Quote
 
  #15 (permalink)
Elite Member
Stockholm
 
Futures Experience: Advanced
Platform: NinjaTrader,Sierra Chart, Python
Broker/Data: IB
Favorite Futures: ES & Stocks
 
Posts: 86 since Apr 2013
Thanks: 80 given, 71 received


giladbi View Post
thanks @donedge
1. i changed the width using
 
Code
par(mar = c(1,1,1,1))
but than got a new error


this error was fixed using

2. the defults package can'tbe installed for r ver 3.03....

any more ideas?


1.
You have to resize the plot window and then you will not get this error.

Just increase the size of the windows with the mouse.

-----

2.
Cant you upgrade your R version?

Reply With Quote
 
  #16 (permalink)
Elite Member
tel aviv
 
Futures Experience: Advanced
Platform: Multicharts, SC
Favorite Futures: es
 
Posts: 34 since Jun 2009
Thanks: 4 given, 1 received

I am trading to use Ilya Kipnis' packages (DSTrading, IKTrading) which are not fitted with higher versions ...

Reply With Quote
 
  #17 (permalink)
Elite Member
Stockholm
 
Futures Experience: Advanced
Platform: NinjaTrader,Sierra Chart, Python
Broker/Data: IB
Favorite Futures: ES & Stocks
 
Posts: 86 since Apr 2013
Thanks: 80 given, 71 received


giladbi View Post
I am trading to use Ilya Kipnis' packages (DSTrading, IKTrading) which are not fitted with higher versions ...

Did you manage to fix the first error?

Reply With Quote
 
  #18 (permalink)
Elite Member
tel aviv
 
Futures Experience: Advanced
Platform: Multicharts, SC
Favorite Futures: es
 
Posts: 34 since Jun 2009
Thanks: 4 given, 1 received

yes
it was fixed with this:
 
Code
dev.off()

Reply With Quote
 
  #19 (permalink)
Elite Member
Stockholm
 
Futures Experience: Advanced
Platform: NinjaTrader,Sierra Chart, Python
Broker/Data: IB
Favorite Futures: ES & Stocks
 
Posts: 86 since Apr 2013
Thanks: 80 given, 71 received


giladbi View Post
yes
it was fixed with this:
 
Code
dev.off()

Ok good. I fixed it by increase the size of the plot so all nine graphs could fit.

Anyway. Good that you solved it.

I was using his package on 3.1.2 and it is working... Maybe it is some of the functions in his package not works on 3.1.2." And only 3.0.3

.....
dev.off shuts down the specified (by default the current) device. If the current device is shut down and any other devices are open, the next open device is made current. It is an error to attempt to shut down device 1. graphics.off() shuts down all open graphics devices. Normal termination of a session runs the internal equivalent of graphics.off().

Reply With Quote
 
  #20 (permalink)
Elite Member
Stockholm
 
Futures Experience: Advanced
Platform: NinjaTrader,Sierra Chart, Python
Broker/Data: IB
Favorite Futures: ES & Stocks
 
Posts: 86 since Apr 2013
Thanks: 80 given, 71 received



donedge View Post
Ok good. I fixed it by increase the size of the plot so all nine graphs could fit.

Anyway. Good that you solved it.

I was using his package on 3.1.2 and it is working... Maybe it is some of the functions in his package not works on 3.1.2." And only 3.0.3

.....
dev.off shuts down the specified (by default the current) device. If the current device is shut down and any other devices are open, the next open device is made current. It is an error to attempt to shut down device 1. graphics.off() shuts down all open graphics devices. Normal termination of a session runs the internal equivalent of graphics.off().

I asked Ilya and he said his packages are working on 3.1.2 so it's just to upgrade!

Reply With Quote

Reply



futures io > > > > Strategies coded in R

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
SendMail() for strategies dsraider NinjaTrader Programming 34 January 17th, 2015 05:03 PM
Needed.Color coded script for ema(changes from red to green with trend)&Volume ind. Rad4633 NinjaTrader 5 October 16th, 2012 03:24 PM
Has anyone coded these indicators? solom113 NinjaTrader 10 July 21st, 2012 06:33 PM
Can a floating window be coded with Ninjascript ? trendisyourfriend NinjaTrader Programming 29 December 21st, 2010 05:02 AM
need paintbar study coded-PLEASE bobbyacim The Elite Circle 3 July 28th, 2010 03:35 PM


All times are GMT -4. The time now is 11:43 AM.

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-11 in 0.13 seconds with 20 queries on phoenix via your IP 54.82.81.154