Determine the last bar where a cross occured. - ThinkOrSwim Programming | futures io social day trading
futures io futures trading

Determine the last bar where a cross occured.
Updated: Views / Replies:429 / 1
Created: by Genfer 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

Determine the last bar where a cross occured.

  #1 (permalink)
Trading Apprentice
Futures Experience: Beginner
Platform: IB
Favorite Futures: SPY, ES, Crude
Posts: 1 since Feb 2015
Thanks: 0 given, 0 received

Determine the last bar where a cross occured.


I would like to modify "MovingAvgCrossover" to add a value, say "lastCross", to store the latest bar (or time) when
the cross happened. This will help me to sort my scan following this value.

def avg1 = MovingAverage(averageType1, price, length1);
def avg2 = MovingAverage(averageType2, price, length2);

plot signal = crosses(avg1, avg2, crossingType == CrossingType.above);

Is there a manner to do this in thinkscript?


Reply With Quote
  #2 (permalink)
Trading Apprentice
St. Louis Missouri USA
Futures Experience: Beginner
Platform: ThinkorSwim
Favorite Futures: Emini NQ, Emini ES
Posts: 1 since Dec 2017
Thanks: 0 given, 0 received

I'm trying to do the same thing. Did you ever figure it out?

Reply With Quote


futures io > > > > > Determine the last bar where a cross occured.

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Scott Hodson: Bitcoin and Cryptocurrency Trading Strategy

Elite only

Ran Aroussi: Python and Machine Learning (part 4) [special time 11AM ET]

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
MA cross with bar paint Michael Krall NinjaTrader 9 December 6th, 2017 08:34 AM
Strategy To Determine Range Of A Bar samuraisam83 EasyLanguage Programming 3 July 24th, 2015 08:53 AM
How to Determine potional P/L on option trade.... mdsvtr Options on Futures 2 December 24th, 2013 04:23 PM
How to step forward bar by bar (F12) with full bar not half bar? mercyman MetaTrader 1 October 23rd, 2012 04:49 PM
How do I determine what size range bar is comparable to a daily bar? Trankuility Traders Hideout 14 January 15th, 2012 10:46 AM

All times are GMT -4. The time now is 11:30 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-04-22 in 0.07 seconds with 19 queries on phoenix via your IP