Pine Script Translation Request: ValueWhen - ThinkOrSwim Programming | futures io social day trading
futures io futures trading

Pine Script Translation Request: ValueWhen
Updated: Views / Replies:1,918 / 0
Created: by compupix 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 90,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

Thread Tools Search this Thread

Pine Script Translation Request: ValueWhen

  #1 (permalink)
Trading Apprentice
Long Beach, CA USA
Futures Experience: Intermediate
Platform: ThinkorSwim
Favorite Futures: Options
Posts: 9 since Jul 2014
Thanks: 3 given, 0 received

Pine Script Translation Request: ValueWhen

Could someone please help me translate the following Pine Script line into ThinkScript:
hlv = valuewhen(hld != 0, hld, 1)

Here's the Pine Script manual's explanation for "valuewhen":
valuewhen (Built-in function) Source series value when the condition was true on the n-th most recent occurrence. Syntax valuewhen(condition, source, occurrence) Arguments condition (series) source (series) occurrence (integer) Examples slow = sma(close, 7) fast = sma(close, 14) // get value of close on second cross occurrence valuewhen(cross(slow, fast), close, 1)
So, I think I need the value of hld for the most recent occurrence when it wasn't 0. What is the best way to code that?


Reply With Quote


futures io > > > > > Pine Script Translation Request: ValueWhen

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5

Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy/PowerLanguage Equiv. of ValueWhen and LastValue OZ Trade MultiCharts 4 October 20th, 2013 02:13 PM
EL translation solotrader Sierra Chart 0 September 22nd, 2013 12:29 PM
Beginner script advice or request mcteague NinjaTrader Programming 3 November 12th, 2012 06:57 PM
Need English translation GridKing News and Current Events 0 February 8th, 2012 04:47 AM
Request: Script to download historical data Henrik Platforms and Indicators 2 January 4th, 2010 01:23 PM

All times are GMT -4. The time now is 02:47 PM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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 2018-05-23 in 0.05 seconds with 19 queries on phoenix via your IP