NexusFi: Find Your Edge


Home Menu

 





Determine the last bar where a cross occured.


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,071 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
Genfer
Geneva/Switzerland
 
Posts: 1 since Feb 2015
Thanks Given: 0
Thanks Received: 0

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

Can you help answer these questions
from other members on NexusFi?
No book, only a stair: journaling fills where price move …
Cryptocurrency
[WTS] ATAS Lifetime ULTRA license – EU buyers only – …
Platforms and Indicators
I developed a free AI-powered (Kronos) forecasting indic …
The Elite Circle
My Rant with AMP Futures
Trading Reviews and Vendors
EA
Platforms and Indicators
 
  #2 (permalink)
foreverwerock
St. Louis Missouri USA
 
Posts: 1 since Dec 2017
Thanks Given: 0
Thanks Received: 0

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


Reply With Quote




Last Updated on December 22, 2017


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts