stochastic now versus 1 bar ago - EasyLanguage Programming | futures io social day trading
futures io futures trading


stochastic now versus 1 bar ago
Updated: Views / Replies:114 / 3
Created: by westofpluto Attachments:0

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

stochastic now versus 1 bar ago

  #1 (permalink)
Encinitas
 
Trading Experience: None
Platform: TradeStation
 
Posts: 4 since Jan 2019
Thanks: 0 given, 0 received

stochastic now versus 1 bar ago

I'm new to easy language and I'm a bit confused about the syntax when comparing the value of the stochastic now versus one bar ago.

The stochastic is computed as follows:

ok = Stochastic(High, Low, Close, 14, 3, 3, 1, oFastK, oFastD, oSlowK, oSlowD);

And the "value" I am looking for is oSlowK - oSlowD. So this is the value at the current bar. How do I get the value at the previous bar? One possibility is this:

ok2 = Stochastic(High[1], Low[1], Close[1], 14, 3, 3, 1, oFastK1, oFastD1, oSlowK1, oSlowD1);
value1 = oSlowK1 - oSlowD1

But is it also (instead) possible to just use this:

value1 = oSlowK[1] = oSowD[1];

What is the correct syntax?

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)
Huntsville, AL
 
Trading Experience: Intermediate
Platform: TradeStation
Broker/Data: Tradestation
Favorite Futures: Index Futures
 
Posts: 10 since Jun 2014
Thanks: 1 given, 0 received



westofpluto View Post
ok2 = Stochastic(High[1], Low[1], Close[1], 14, 3, 3, 1, oFastK1, oFastD1, oSlowK1, oSlowD1);
value1 = oSlowK1 - oSlowD1


westofpluto View Post
value1 = oSlowK[1] = oSowD[1];

I believe the two code snippets should provide exactly the same answer. As a test, put both sets of code in the same indicator and plot them. I would expect they would be the same line.

Reply With Quote
 
  #4 (permalink)
Legendary  Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,053 since Apr 2013
Thanks: 360 given, 1,296 received

westofpluto,

you can reference previous bar's values for variables (just like you can do for some reserved words) using [x], where x is the number of bars back starting from the current bar, which is 0.
In your case both ways will work, but since you likely call the stochastic already within your code getting the previous bars values using oSlowK[1] and oSowD[1] will be more efficient.

If you haven't done so already, I would suggest checking out the free EasyLanguage Essentials PDF that you can download on the Tradestation website. It will bring you up to speed in terms of the basics of EasyLanguage.

Regards,

ABCTG

Reply With Quote

Reply



futures io > > > > > stochastic now versus 1 bar ago

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

Thanks for everything -- $250 in Amazon Gift Cards ready to give away

Right now
 

Journal in July -- over $2,500 in prizes w/NinjaTrader

July
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Highest bar between 20 and 40 bars ago DavidBodhi NinjaTrader Programming 5 August 25th, 2017 02:35 PM
How to step forward bar by bar (F12) with full bar not half bar? mercyman MetaTrader 1 October 23rd, 2012 04:49 PM
Stochastic of a Stochastic adrenalinz MultiCharts 5 July 20th, 2012 08:04 AM
HSBC Profit 'Well Ahead' of Year Ago, Bad Debts Fall Quick Summary News and Current Events 0 November 5th, 2010 05:40 AM
x sessions ago SARdynamite NinjaTrader Programming 15 July 13th, 2010 08:20 PM


Tags
code, dow, easy language, easylanguage, indicator, indicators, information, multicharts, neoticker, snippets, stochastic parameters, stochastics, tradestation, values

All times are GMT -4. The time now is 06:09 PM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432 WhatsApp Business, 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