NexusFi: Find Your Edge


Home Menu

 





EL Code For Widest Range in Past 4 Bars


Discussion in TradeStation

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




 
Search this Thread
  #1 (permalink)
conqstspd
Fort Lauderdale Florida
 
Posts: 3 since Jan 2020
Thanks Given: 1
Thanks Received: 0

I recently did some reading and found a trade setup I would like to code for TS. Unfortunately I am not a coder

I want a ShowMe or Paintbar when:

Bar makes the widest range of the past 4 bars

Both for intraday timeframes(30/60/120/240) and daily.

TS has one for Narrow Range Bar but not widest - odd.

Any help or input would be appreciated.

Best


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
Four New E-mini Futures Launch June 29 -- Russell 3000, …
Emini and Emicro Index
Would a node-based workflow for automated trading be useful?
Traders Hideout
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
 
  #2 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
Posts: 364 since Jul 2011


conqstspd View Post
I recently did some reading and found a trade setup I would like to code for TS. Unfortunately I am not a coder

I want a ShowMe or Paintbar when:

Bar makes the widest range of the past 4 bars

Both for intraday timeframes(30/60/120/240) and daily.

TS has one for Narrow Range Bar but not widest - odd.

Any help or input would be appreciated.

Best

Try this:

 
Code
Input: NR(4);

IF H-L>Highest(H-L,NR-1)[1] Then Begin
Plot1(High,"High");
Plot2(Low,"Low");
End;


Reply With Quote
  #3 (permalink)
conqstspd
Fort Lauderdale Florida
 
Posts: 3 since Jan 2020
Thanks Given: 1
Thanks Received: 0


Wow! Think you nailed it. The code you sent is definitely highlighting the bar I found manually yesterday.

Appreciate your effort!


Reply With Quote




Last Updated on January 24, 2020


© 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