Converting Tradestation ELA to R - Matlab, R project and Python | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > Matlab, R project and Python

Converting Tradestation ELA to R
Started:July 3rd, 2014 (08:23 AM) by Trueblue Views / Replies:670 / 2
Last Reply:August 13th, 2014 (04:24 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Converting Tradestation ELA to R

Old July 3rd, 2014, 08:23 AM   #1 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: Forex
Posts: 2 since Mar 2013
Thanks: 2 given, 0 received

Converting Tradestation ELA to R

Hi, I am trying to convert some ELA Indicators into R, early days..steep learning curve!
One issue have puzzled over for hours is storing a value in temp memory when a value is triggered and held there
until instructed otherwise by Value14:

EG in Tradestation:

if value18 > 0 then begin
value20 = 1;
if value14 < value14[1] and value14[1] < value14[2] then value20 = 0;

In R tried many combinations and would really appreciate if someone had any pointers:

#works exactly on some but random appearances outside of that
value19 <- ifelse({value14 < lag(value14,1)&lag(value14,1) < lag(value14,2)},-1,0)
value20 <- ifelse(value18 > 0 & lag(value18,-1 == 0),5,ifelse(value19 < 0,0, lag(value20,1)))


Reply With Quote

Old July 3rd, 2014, 08:23 AM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Old August 13th, 2014, 04:24 PM   #3 (permalink)
Elite Member
Philadelphia + NJ/US
Futures Experience: Beginner
Platform: quantstrat
Favorite Futures: ETFs
Posts: 52 since Aug 2014
Thanks: 4 given, 39 received

value20 <- 1
value20[value14 < lag(value14) & lag(value14) < lag(value14,2)] <- 0
value20[1:18] <- NA

Or if they're all one data.frame (or better yet, xts), with two of the column names being value20 and value14:

tmp$value20[tmp$value14 < lag(tmp$value14) & lag(tmp$value14) < lag(tmp$value14,2)] <- 0

Reply With Quote
The following 3 users say Thank You to IlyaKipnis for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > Matlab, R project and Python > Converting Tradestation ELA to R

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting indicator ness1g NinjaTrader 1 October 14th, 2013 01:29 PM
Converting code from Tradestation/ Plots Swing Point Highs/Lows wbtrader NinjaTrader Programming 4 May 14th, 2013 08:20 PM
ELA Assistance on Bar Valuation and Data Series bullsandthebears Elite EasyLanguage Automated Trading 1 July 31st, 2012 06:15 PM
Converting code Jbird10 EasyLanguage Programming 3 December 22nd, 2011 08:04 PM
Help converting CCI SQZ Zero Heat from TradeStation to NinjaTrader incometrade NinjaTrader Programming 2 January 28th, 2011 09:18 AM

All times are GMT -4. The time now is 12:30 PM.

Copyright © 2016 by 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 2016-10-23 in 0.08 seconds with 20 queries on phoenix via your IP