Big Mike's Trading Forum
 

Go Back   Big Mike's Trading Forum

> Trading Forums > Platforms and Indicators > TradeStation > EasyLanguage Programming


Notices
     

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

Welcome to Big Mike's Trading Forum.

Welcome, Guest!

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

BMT is 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
 
Trading Experience: Intermediate
Platform: Tradestation
Favorite Instrument: 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
Georgia
 
Trading Experience: Intermediate
Platform: NT
Broker/Data: Kinetick, DDT
Favorite Instrument: trombone
 
cbritton's Avatar
 
Posts: 221 since Mar 2010
Thanks: 149 given, 219 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
 
Trading Experience: Intermediate
Platform: Tradestation
Favorite Instrument: 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
Georgia
 
Trading Experience: Intermediate
Platform: NT
Broker/Data: Kinetick, DDT
Favorite Instrument: trombone
 
cbritton's Avatar
 
Posts: 221 since Mar 2010
Thanks: 149 given, 219 received

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
 
Trading Experience: Advanced
Platform: My own custom solution
Favorite Instrument: SP500, Stocks
 
Big Mike's Avatar
 
Posts: 31,207 since Jun 2009
Thanks: 20,752 given, 38,210 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
 
Trading Experience: Intermediate
Platform: Tradestation
Favorite Instrument: 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



Tags
ces, charts, close, code, conversion, easylanguage, entry, es, exit, language, macd, market, multicharts, neoticker, parabolic, parabolic sar, parabolicsar, programming, prorealtime, prt, puts, sar, settings, signal, signals, strategy, trader, trades, tradestation, type, values, variable
     

Big Mike's Trading Forum > Trading Forums > Platforms and Indicators > TradeStation > EasyLanguage Programming > ProRealTime to TStation Code Conversion

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
MQ4 to Ninjatrader conversion bryce NinjaTrader Programming 25 October 26th, 2012 01:14 AM
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
Prorealtime free realtime data ... NeoTrade Platforms and Indicators 0 March 3rd, 2011 02:39 AM
Coding Help for Indicator Conversion syxforex NinjaTrader 5 May 15th, 2010 11:23 AM


All times are GMT -4. The time now is 08:06 PM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2014 by Big Mike Trading. 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 2014-04-24 in 0.22 seconds with 20 queries on phoenix via your IP 23.21.23.126