NexusFi: Find Your Edge


Home Menu

 





John Carter's close below 21 day high


Discussion in ThinkOrSwim

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




 
Search this Thread

John Carter's close below 21 day high

  #1 (permalink)
Beamsplitter
Fayetteville,Arkansas
 
Posts: 4 since Jul 2016
Thanks Given: 5
Thanks Received: 1

Hello
Im new to the TOS platform and ThinkScript. I come over from Tradstation and Easylanguage.
I wonder if anyone can help me properly code this study.
Im trying to duplicate John Carters close below the 21 day high study.
The english for this would be to mark the bar that closes below the low of the highest high bar of the last 21 days.
Ive tried to find examples of simular studies to work off of to no avail.
Any help would be appreciated.
Thanks.
Here is what I tried to do so far.

declare upper;

def hiday = Highest(high, 21);

plot sigday = ( hiday[1] and close < low[1]) or ( hiday[2] and close < low[2]) ;

sigday.SetPaintingStrategy(PaintingStrategy.Boolean_ARROW_DOWN);

sigday.SetDefaultColor(Color.GREEN);

As written, the code produces arrows on days closing below
any higher day not just the 21 day high.

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
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
22 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 thanks
  #2 (permalink)
Beamsplitter
Fayetteville,Arkansas
 
Posts: 4 since Jul 2016
Thanks Given: 5
Thanks Received: 1

I figured it out. Thanks for all your help and input.

Reply With Quote
  #3 (permalink)
 greekbroker 
Asheville, NC
 
Experience: Advanced
Platform: TS, IB, NinjaTrader
Trading: Stocks
Posts: 3 since Nov 2014
Thanks Given: 0
Thanks Received: 0


Hello, I purchased this indicator from John Carter, and it works great in both TradeStation and NinjaTrader; however, it will not give any signals in Bloodhound; any ideas? I'd like to pay someone to code it for me, unless it already exists somewhere for free! Thanks very much!

Reply With Quote
  #4 (permalink)
TW10
Denver CP/USA
 
Posts: 2 since Apr 2016
Thanks Given: 0
Thanks Received: 0

Can you share & post how you fixed your code?

Reply With Quote
  #5 (permalink)
Beamsplitter
Fayetteville,Arkansas
 
Posts: 4 since Jul 2016
Thanks Given: 5
Thanks Received: 1

low 21
declare upper;

def loday = lowest(low, 21 );



plot sigday = if( loday[1] == low[1] and close > high[1] ) or ( loday[2] == low[2] and close > high[2] ) or ( loday[3] == low[3] and close > high[3] ) or ( loday[4] == low[4] and close > high[4] ) then yes else Double.nan;
##

sigday.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);


sigday.SetDefaultColor(Color.GREEN);

****************************************************************************************
Hi 21


declare upper;
#input displace = 0;
def hiday = Highest(high, 21 );


#plot sigday = ( hiday[1] and close < low[1]) or ( hiday[2] and close < low[2]) ;
plot sigday = if( hiday[1] == high[1] and close < low[1] ) or ( hiday[2] == high[2] and close < low[2] ) or ( hiday[3] == high[3] and close < low[3] ) or ( hiday[4] == high[4] and close < low[4] ) then yes else Double.nan;
##

sigday.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);


sigday.SetDefaultColor(Color.GREEN);

This is the best I could do.

Reply With Quote




Last Updated on September 24, 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