DEMA Crossover with Heikin-Ashi Candle Confirmation for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
@Talochka You must have added the code as a Study instead of a Strategy.
 
S

San

Member
2019 Donor
@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
 
theelderwand

theelderwand

Member
2019 Donor
VIP
Hello @Talochka What do you mean by did not work for me at all ?
 
mc01439

mc01439

Well-known member
2019 Donor
VIP
@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.
 
markos

markos

Well-known member
VIP
Thank you for sharing! @mc01439 (y) Very concise.

@San please note the chart example above.
 
S

San

Member
2019 Donor
@mc01439 , Cool and its give clear view... Thanks for your input....
 
H

heramone

New member
VIP
@BenTen - my question, is this above script updated or not? I am not computer guy so dont know where to change with what? Could you please confirm above script was update with Open to Close or Close to Open. Thanks
 
H

heramone

New member
VIP
This script does nothing in ThinkorSwim platfrom. No indication, nothing appears like the picture. Can someone help me with the original scrip Thanks
 
BobbyD

BobbyD

New member
@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;
 
mc01439

mc01439

Well-known member
2019 Donor
VIP
@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.
 
A

awienen

New member
VIP
This study does not open for me can someone please help!!
 
BenTen

BenTen

Administrative
Staff
VIP
@awienen This is not a study, you have to add it as a strategy.
 
D

DaGekko

Member
2019 Donor
VIP
If you change open to close it gives much better representation - works best on futures
 
D

DaGekko

Member
2019 Donor
VIP
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
 
D

DaGekko

Member
2019 Donor
VIP
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.
 
theelderwand

theelderwand

Member
2019 Donor
VIP
@DaGekko could you share your TS script on DM ?
 
P

paraglohiya

New member
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.
 
Top