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


Determine the last bar where a cross occured.
Started: by Genfer Views / Replies:142 / 0
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
 

Determine the last bar where a cross occured.

  #1 (permalink)
Trading Apprentice
Geneva/Switzerland
 
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.

Hi,

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?

Thanks.

Reply With Quote

Reply



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)
 

Mastering Trading Pysychology w/Brett Steenbarger & Trading Technologies

Elite only

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only

FIO Video Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

April

Process above all else w/Anthony Crudele @ Futures Radio Show

Elite only

Machine Learning - Quantitative Trading w/Martin Froehler @ Quantiacs

Elite only

Ask Me Anything w/Patrick Rooney @ Trading Technologies

Apr 18

Ask Me Anything w/FuturesTrader71

Apr 19

Machine Learning w/Kris Longmore

Elite only

Market Analysis w/Dave Forss

Apr 25

Introducing iSystems with Stage 5 Trading

Apr 27
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strategy To Determine Range Of A Bar samuraisam83 EasyLanguage Programming 3 July 24th, 2015 08:53 AM
MA cross with bar paint Michael Krall NinjaTrader 6 June 21st, 2015 05:55 PM
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 06:28 AM.

no new posts
Page generated 2017-03-23 in 0.06 seconds with 19 queries on phoenix via your IP 54.166.82.161