futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming


ProRealTime to TStation Code Conversion
Started:May 8th, 2012 (07:53 AM) by jimmy1000 Views / Replies:2,113 / 6
Last Reply:May 9th, 2012 (09:05 PM) Attachments:1

Welcome to futures.io.

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
     

Reply
 
Thread Tools Search this Thread

ProRealTime to TStation Code Conversion

Old May 8th, 2012, 07:53 AM   #1 (permalink)
Elite Member
sydney, Australia
 
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: oil
 
Posts: 6 since May 2012
Thanks: 1 given, 0 received

ProRealTime to TStation Code Conversion

Hi. I would like to recode a Prorealtime strategy to Easy-Language (for use with TS).

Its based on parabolic-sar and includes a short circuit to halt entrysignals during extremely bearish conditions.

Could anyone assist with the following code:
.......................................................................................................
REM Buy

indicator1 = SAR[0.02,0.02,0.2]
indicator2 = close
c1 = (indicator1 CROSSES OVER indicator2)

indicator3 = MACDline[1,195,1](close)
c2 = (indicator3 > -15.0)

IF c1 AND c2 THEN
BUY 1 SHARES AT MARKET THISBARONCLOSE
ENDIF


REM Sell

indicator4 = SAR[0.02,0.02,0.2]
indicator5 = close
c3 = (indicator4 CROSSES UNDER indicator5)

indicator6 = MACDline[1,195,1](close)
c4 = (indicator6 < -15.0)

IF c3 Or c4 THEN
SELL AT MARKET THISBARONCLOSE
ENDIF

Reply With Quote
     

Old May 8th, 2012, 07:53 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 May 8th, 2012, 09:52 AM   #3 (permalink)
Elite Member
Atlanta, Georgia
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: DDT
Favorite Futures: ZN, ZB
 
cbritton's Avatar
 
Posts: 223 since Mar 2010
Thanks: 152 given, 236 received


My first stab at it.

 
Code
inputs:  AfStep( 0.02 ), AfLimit( 0.2 ),
	FastMACDLength( 12 ),
	SlowMACDLength( 26 ),
	MACDAvgLength( 9 ) ;
variables:  oParCl( 0 ), oParOp( 0 ), oPosition( 0 ), oTransition( 0 ),
	MACDValue( 0 );

MACDValue = MACD( Close, FastMACDLength, SlowMACDLength ) ;

Value1 = ParabolicSAR( AfStep, AfLimit, oParCl, oParOp, oPosition, oTransition ) ;

condition1 = oPosition = -1 and close > oParCl and close[1] < oParCl[1];
// another way to watch for "cross over" is when oPosition[1] = -1 and oPosition[0] = 1. i.e. when they switch

condition2 = MACDValue > -15;
if marketPosition = 0 and condition1 and condition2 then
	Buy ( "LE" ) this bar on close ;

condition3 = oPosition = 1 and close < oParCl and close[1] > oParCl[1];
condition4 = MACDValue < -15;
if marketPosition = 0 and condition3 and condition4 then 
	SellShort ("SE") this bar on close;
Obviously, you will need to adjust the input values to match what your Prorealtime code, but I think this approximates what you are looking for. The psar cross over would need to be tweaked a bit, I think. I have not tested this, however.

Regard,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
     
The following 2 users say Thank You to cbritton for this post:
     

Old May 9th, 2012, 06:42 AM   #4 (permalink)
Elite Member
sydney, Australia
 
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: oil
 
Posts: 6 since May 2012
Thanks: 1 given, 0 received

hi cbritton

thanks alot for the prompt reply/code. However it doesnt work. it passes the E-Language verification however no signals are generated.

i kept tweaking it over and over to see if one particular variable was causing it not to work, but that didnt work.

i removed everything relating to MACD and had it try and buy and sell based only on the parabolic sar crosses and this did not work either. it seems it is primarily caused by the use of the Parabolic Sar references.

Also the code you have posted shows sellshort. this is a long only type strategy.

The entries look like this:

freeimagehosting . net /t/69rzq. jpg
(link without the spaces - as i am a new member i cannot post links till post count > 5)

Thanks again.

Reply With Quote
     

Old May 9th, 2012, 11:31 AM   #5 (permalink)
Elite Member
Atlanta, Georgia
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: DDT
Favorite Futures: ZN, ZB
 
cbritton's Avatar
 
Posts: 223 since Mar 2010
Thanks: 152 given, 236 received

Futures Edge on FIO
I'll try it out later today and hopefully post some updates.

Can you provide some charts with trades from Prorealtime trader with this strategy? I'd like to compare with the same instrument and settings in TS.

Thanks,
-C


jimmy1000 View Post
hi cbritton

thanks alot for the prompt reply/code. However it doesnt work. it passes the E-Language verification however no signals are generated.

i kept tweaking it over and over to see if one particular variable was causing it not to work, but that didnt work.

i removed everything relating to MACD and had it try and buy and sell based only on the parabolic sar crosses and this did not work either. it seems it is primarily caused by the use of the Parabolic Sar references.

Also the code you have posted shows sellshort. this is a long only type strategy.

The entries look like this:

freeimagehosting . net /t/69rzq. jpg
(link without the spaces - as i am a new member i cannot post links till post count > 5)

Thanks again.


“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
     

Old May 9th, 2012, 12:27 PM   #6 (permalink)
Administrator: 'da Big Dawg
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 45,192 since Jun 2009
Thanks: 28,692 given, 78,536 received


jimmy1000 View Post
(link without the spaces - as i am a new member i cannot post links till post count > 5)

Attach images to your post instead of embedding them.

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
     

Old May 9th, 2012, 09:05 PM   #7 (permalink)
Elite Member
sydney, Australia
 
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: oil
 
Posts: 6 since May 2012
Thanks: 1 given, 0 received

no problem BigMike.

Here is a pic of PRT generating/executing the entry/exit signals

Attached Thumbnails
ProRealTime to TStation Code Conversion-crude-prt-sample.jpg  
Reply With Quote
     

Reply



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming > ProRealTime to TStation Code Conversion

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Events (4:30PM ET unless noted)
 

Peter Davies: Getting Started in Scalping/Ultra Short Term Trading

Aug 25

FIO Journal Contest with over $2000 in prizes [entire month]

September

John Hoagland (TopstepTrader): agenda TBA

Sep 1
 

John Grady (sponsored by Jigsaw Trading): Choosing the right market

Elite only
 

Ferran Font Ramentol (sponsored by Stage 5): Scalping the Order Book in the HFT world

Elite only

Brannigan Barret: agenda TBA

Elite only

FuturesTrader71: agenda TBA (part 4 of 4) [w/book giveaway]

Elite only
 

Tradovate: the modern, cloud-based futures trading platform

Sep 22
 

Jigsaw Trading: Standalone Tools now available

Sep 26

Suri Duddella: The 10 Basic Trading concepts to follow in the Markets (part 2 of 2) [w/book giveaway]

Elite only

Linda Bradford Raschke: agenda TBA [w/book giveaway]

Elite only

Raymond Deux (NinjaTrader): NinjaTrader 8 overview and Q&A

Elite only

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/FIO member shodson

Elite only

An Afternoon with FIO trader GFIs1

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Oct TBD
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Prorealtime free realtime data ... NeoTrade Platforms and Indicators 1 June 13th, 2015 10:38 AM
MQ4 to Ninjatrader conversion bryce NinjaTrader Programming 37 September 4th, 2014 04:22 PM
Mq4 Conversion To Ninja 7 airalex NinjaTrader Programming 7 August 12th, 2012 07:38 AM
Mq4 Conversion To Ninja 7 Techfan1128 NinjaTrader Programming 5 September 29th, 2011 09:05 AM
Coding Help for Indicator Conversion syxforex NinjaTrader 5 May 15th, 2010 11:23 AM


All times are GMT -4. The time now is 10:53 AM.

Copyright © 2016 by 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 2016-08-25 in 0.10 seconds with 20 queries on phoenix via your IP 54.166.148.252