NexusFi: Find Your Edge


Home Menu

 





Determine the last bar where a cross occured.


Discussion in ThinkOrSwim

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




 
Search this Thread

Determine the last bar where a cross occured.

  #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?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
About a successful futures trader who didnt know anythin …
Psychology and Money Management
MC PL editor upgrade
MultiCharts
What broker to use for trading palladium futures
Commodities
 
  #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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts