NexusFi: Find Your Edge


Home Menu

 





help with sierra custom study, color bar based on condition


Discussion in Sierra Chart

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




 
Search this Thread
  #1 (permalink)
 rmiller863 
Lake wales FL/ USA
 
Experience: Intermediate
Platform: TOS ,Tradestation, Sierra
Trading: Futures
Posts: 41 since Jul 2013
Thanks Given: 9
Thanks Received: 2

Id like to make a custom study on Sierra charts. Using the color bar based on alert condition, a study that would plot a point if the current candle opens outside the range of open and close of the previous candle? High or low wouldn't matter, as long as its not opening in the body of previous candle?

thank you


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Four New E-mini Futures Launch June 29 -- Russell 3000, …
Emini and Emicro Index
Iran and Israel Stand Down: What $9M in Peace Contracts …
Prediction Markets & Event Contracts
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
Hormuz Completely Closed: US Strikes Day 2, Iran Shoots …
Traders Hideout
Post-Summit Scorecard: $36M in May 15 Bets Settle Near-Z …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 Sawtooth 
Prescott AZ USA
 
Experience: Advanced
Platform: SierraChart
Broker: EdgeClear, FCM:Phillip, Data:Denali, Routing:Teton
Trading: YM RTY ES NQ
Posts: 480 since Nov 2009
Thanks Given: 222
Thanks Received: 608

Try this:
=OR(AND(C[-1]>O[-1],O>C[-1]),AND(C[-1]<O[-1],O<C[-1]))

You can learn to do this yourself:

With Simple Alert syntax, the OHLC of a bar is:
Open = O
High= H
Low= L
Close=C

Previous bars are located with a [-1] suffix:
previous Open = O[-1]
previous High= H[-1]
previous Low= L[-1]
previous Close=C[-1]

OR and AND functions are opened and closed with parentheses ().

The Close of a [previous] candle is at one side of the candle body, either at the upper or lower.
If it is at the upper, then: C[-1]>O[-1] and the current open must be greater than the previous close: O>C[-1]
If it is at the lower, then: C[-1]<O[-1] and the current open must be less than the previous close: O<C[-1]

Since either can happen, they are combined with OR.

To make it visually easier, you can use spaces to separate sections:
=OR( AND( C[-1]>O[-1], O>C[-1] ), AND( C[-1]<O[-1], O<C[-1] ) )


Reply With Quote
  #3 (permalink)
 rmiller863 
Lake wales FL/ USA
 
Experience: Intermediate
Platform: TOS ,Tradestation, Sierra
Trading: Futures
Posts: 41 since Jul 2013
Thanks Given: 9
Thanks Received: 2


Thanks, just what I was looking for.


Started this thread Reply With Quote




Last Updated on June 24, 2019


© 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