DEMA Crossover with Heikin-Ashi Candle Confirmation for ThinkorSwim

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

@mc01439, Pls clarify, you have tested using 3200 ticket instead of regular chart with the time frame 1,5 and 15 mts , Can you share your 3200 ticker setting. I am not clear or i understand differently :)

@BenTen How to change "open to close" setting
 
@San

Tick Chart vs. One-Minute Chart for Day Trading
The Pros and Cons of Tick and Time-Based Charts

By Cory Mitchell
Updated August 26, 2019

Traders have a number of options when it comes to which chart types they use. Candlesticks and bar charts are the most popular. They provide the same information, except candlesticks are color-coded and easier to see. When using these two types of charts traders can choose to create price bars based on time or ticks. Time and tick charts both have pros and cons.

One-Minute or Time-Based Chart
If you use a one-minute chart (or two-minute or five-minute), a new price bar forms when the time period elapses. On a one-minute chart, a new bar forms every minute, showing the high, low, open, and close for that one-minute period.

This creates a uniform x-axis on the price chart because all price bars are evenly spaced over time. 60 price bars are produced each hour, assuming at least one transaction took place. One-minute charts are popular among day traders but aren't the only option.

Tick Chart
The bars on a tick chart are created based on a particular number of transactions. For example, a 512 tick chart creates a new bar every 512 transactions. Customize tick charts to the number of transactions you want, for example, 5 ticks or 1546 ticks.

Throughout the day there are active and slower times, where many or few transactions occur. Therefore, the x-axis typically isn't uniform with ticks charts. When a market opens there is lots of volatility and action, so tick bars occur very quickly. Five ticks bars may form in the first minute alone. During the lunch hour, though, when the number of transactions decreases, it may take five minutes before a single tick bar is created.

Comparing a One-Minute Chart to a Tick Chart
When there's lots of activity a tick chart shows more information (more price waves, consolidations, and smaller-scale price moves) than a one-minute chart. For example, when a market opens several ticks bars within the first minute or two may show multiple price swings which can be used for trading purposes. If using a one-minute chart only one bar forms in the first minute, and two bars after two minutes. These one or two bars may not present the same trading opportunities as the several tick bars that occurred over the same time frame.

In this way, tick charts allow you to get into moves sooner, take more trades, and spot potential reversals before they occur on the one-minute chart.

When there are few transactions going through, a one-minute chart appears to show more information. For example, assume you are debating using a 90 tick chart or a one-minute chart. Assume that during the lunch hour only 10 transactions occur each minute. It will take nine minutes for a tick bar to complete and for a new one to start. The one-minute charts show a bar each minute as long as there is a transaction. In this case, the one-minute chart produces nine times as many bars as the tick chart, showing more price waves, trends, and support and resistance levels that could potentially be traded.

Tick charts "adapt" to the market. Fewer bars form when there are fewer transactions, warning a trader that activity levels are low or dropping. The one-minute chart, on the other hand, continues to produce price bars every minute as long as there is one transaction in that minute. This may create the illusion of activity, even though there may actually be little volume in the stock, futures contract, or forex pair.

In the chart example, a one-minute chart is compared to a 1000 tick chart of the SPDR S&P 500 (SPY). Both charts start and end at 9 a.m. and 4:02 p.m., respectively. The one-minute chart provides more price bars before 9:30 a.m., but the tick chart creates more price bars during the day (when there is a higher number of transactions) essentially creating a higher "resolution" view of price moves.

One chart type isn't necessarily better than another. Both can be traded effectively using the right day trading strategy, but traders should be aware of both types so they can determine which works better for their trading style.
 
This script does nothing in ThinkorSwim platfrom. No indication, nothing appears like the picture. Can someone help me with the original scrip Thanks
 
@mc01439 Hello, I am confused as to why the going up crossover uses the next candle but the crossing down crossover uses the previous candle? Also, how can one enter an order at current price when using a future candle?

def demaCrossingOverGoingUp = demaSlow < demaFast and demaSlow[-1] > demaFast[-1];
def demaCrossingOverGoingDown = demaSlow[1] > demaFast[1] and demaSlow < demaFast;
 
  • Like
Reactions: ALF
@mc01439 Hello, I am confused as to why the going up crossover uses the next candle but the crossing down crossover uses the previous candle? Also, how can one enter an order at current price when using a future candle?

def demaCrossingOverGoingUp = demaSlow < demaFast and demaSlow[-1] > demaFast[-1];
def demaCrossingOverGoingDown = demaSlow[1] > demaFast[1] and demaSlow < demaFast;
Looks like a mistake to me - would use the past not future.
 
I'm not looking for automation - just watching signals on Futures. If you change the open to close it will print the entry $ as the close of the prior bar. Only disparity really is futures over the weekend opening Sunday night
 
I ported this over to Easylanguage for Tradestation - I didn't know that TOS didn't have autotrading. Either way... strategy still holds up in Tradestation going forward testing for futures. Equities might be harder since there can be a lot of overnight movement. Weekends are the mostly the only issue with Futures.
 
Nothing happened for me as well when I created new script in ToS. it just shows +++++ in the menu on top when I scroll the cursor.
 

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
355 Online
Create Post

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top