Coding Your Own Stochastic Indicator - EasyLanguage Programming | futures.io
futures io futures trading


Coding Your Own Stochastic Indicator
Started: by djvie11 Views / Replies:183 / 4
Last Reply: Attachments:0

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
 

Coding Your Own Stochastic Indicator

  #1 (permalink)
Trading Apprentice
Chicago, IL
 
Futures Experience: Advanced
Platform: Tradestation + Multicharts
Favorite Futures: Forex, Futures
 
Posts: 27 since Jul 2013
Thanks: 14 given, 1 received

Coding Your Own Stochastic Indicator

Hi Guys!

So I've been trying to code my own version of a stochastic crossover so I have more control over it. Below is my code but it's not working quite like the one that's already built into the system.

I'm trying to do this so I can get a signal on a 2 data chart (Stochastic is meant for Data2), but not having to wait until the close of Data2 to actually get the stochastic signal.

Please let me know if you think I'm missing something on the below code. Thanks!

 
Code
Inputs:
PercentK_data2 ((C of data2 - Lowest (L of data2,14)) / (Highest (H of data2,14)) - (Lowest (L of data2,14)) / 100 ) ;

Variables:
PercentD_data2 (Average (bkPercentK_data2, 3)) ;

Condition1 = bkPercentK_data2 > bkPercentD_data2 ;
Condition2 = bkPercentK_data2 < bkPercentD_data2 ;

Reply With Quote
 
  #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.

 
  #3 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,234 since Apr 2013
Thanks: 199 given, 694 received


djvie11,

what exactly does your code do and more important, what do you want your code to do instead?

Did you print or plot the input and variable to see if they hold the values that you expect them to have?

Regards,

ABCTG


Last edited by ABCTG; October 21st, 2016 at 12:33 PM.
Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Chicago, IL
 
Futures Experience: Advanced
Platform: Tradestation + Multicharts
Favorite Futures: Forex, Futures
 
Posts: 27 since Jul 2013
Thanks: 14 given, 1 received


ABCTG View Post
djvie11,

what exactly does your code do and more important, what do you want your code to do instead?

Regards,

ABCTG

The calculations are a little screwy, and I'd also like to make the 14-period input a variable. However, when trying to make it an input, I get a "Wrong Expression" error after trying to compile the code.
(PercentK_data2 ((C of data2 - Lowest (L of data2,14)) )

Ex:
 
Code
Inputs:
14PeriodVar (1),
PercentK_data2 ((C of data2 - Lowest (L of data2,14PeriodVar)) / (Highest (H of data2,14PeriodVar)) - (Lowest (L of data2,14PeriodVar)) / 100 ) ;

Reply With Quote
 
  #5 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,234 since Apr 2013
Thanks: 199 given, 694 received

Futures Edge on FIO
djvie11,

I would suggest to start with making the code easier to read and to maintain i.e. not trying to put the whole code computations into one input and variable, but instead by using several variables that you compute within your code (and not on declaration). The issue you might run into otherwise is that the variable keeps a static value, although you think it's dynamic.

A good way to verify this is by printing or plotting the actual value for input and variable in it's current form.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:

Reply



futures io > > > > > Coding Your Own Stochastic Indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

NinjaTrader 8: Tips and Tricks (part 2)

Mar 2
 

An Afternoon With FIO member @michaelleemoore

Elite only
 

Jigsaw Trading: Keys to successfully trading the open

Mar 9

Macro view: Trump Market Risk w/Piers Curran @ Amplify Trading

Elite only

Reading the Psychology of the Market w/Brett Steenbarger & Trading Technologies

Elite only

Hybrid Machine Learning (R and TradeStation) w/Murray Ruggiero

Elite only

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other]       Indicator Parameter? Stochastic Momentum Index EdenR Platforms and Indicators 4 November 21st, 2016 03:55 PM
TOS EFV Stochastic Indicator eensor ThinkOrSwim 0 June 15th, 2016 01:02 PM
VSR Indicator (Volume/Stochastic/Reversal Bars) HJay The Elite Circle 22 May 11th, 2016 12:25 PM
Stochastic Momentum Index Indicator sunny135 NinjaTrader 1 January 8th, 2014 11:54 AM
Stochastic %K Indicator timefreedom The Elite Circle 4 September 16th, 2010 05:12 PM


All times are GMT -4. The time now is 03:04 PM.

no new posts
Page generated 2017-02-26 in 0.09 seconds with 19 queries on phoenix via your IP 54.204.130.94