- ago
The values of the ScaleInd indicator on the daily charts of cryptocurrencies do not match the values of the indicators on the weekly timeframe. But on the stock charts, everything is fine.

0
430
Solved
17 Replies

Reply

Bookmark

Sort
Cone8
 ( 28.45% )
- ago
#1
The difference is:

1. the first one is truly a 5-week moving average.
2. the second is a 5-day moving average scaled to weekly. In other words, you're seeing the Friday value of a 5-day moving average.

To get the same result, you need to first convert the bars (or Close series) to the Weekly scale, and then apply the SMA indicator.
0
- ago
#2
That is, this indicator is just for beauty? :)

0
- ago
#3
Probably because the weekly bar for cryptocurrency changes on Saturday, and the Scaleind indicator changes its value on Sunday.
0
Cone8
 ( 28.45% )
- ago
#4
Good call fred9999.

It's a bug. Not even the Weekly bars are formed correctly.

What is is the end of the week? Friday, Saturday, or Sunday?
Depending on the country your from and your trading perspective, there might be 3 different answers!

We're going to have to dig in to the Synchronizer for instruments that trade on Saturdays. Stand by!
0
Cone8
 ( 28.45% )
- ago
#5
It appears that the industry standard is that Weekly bars for Cryptos end on Sunday night, and the Monday bar is the Open for the new week.
0
Cone8
 ( 28.45% )
- ago
#6
This is fixed for Build 34.

Since Providers like Kraken and Binance return Weekly bars natively, there can be minor differences between indicators based on Weekly bars compared to indicators based on compressed data. For example, you might notice minor differences in the Sunday Daily Close with their own Weekly close.

The Weekly compression change for Cryptos will be transparent and works find with ScaledInd. If you're a C# Coder and working with compressed indicators in the Weekly Scale (probably a huge percentage of the world population), pay attention to the comments in the example below.

CODE:
public override void Initialize(BarHistory bars) {          //this works - good news for building blocks!          TimeSeries ts = new ScaledInd(bars, SMA.Series(bars.Close, 20), HistoryScale.Weekly);          PlotTimeSeriesLine(ts, ts.Description, "Price", WLColor.Purple);          //** Don't use this method for Weekly Cryptos **//          //TimeSeries ts2 = TimeSeriesCompressor.ToWeekly(bars.Close);          //Use the BarHistoryCompressor instead          TimeSeries ts2 = BarHistoryCompressor.ToWeekly(bars).Close;                   ts2 = SMA.Series(ts2, 20);                    ts2 = TimeSeriesSynchronizer.Synchronize(ts2, bars, null, bars.Market);          PlotTimeSeriesLine(ts2, ts2.Description, "Price", WLColor.White, 1);          WriteToDebugLog(ts.ToString());           }

0
Best Answer
- ago
#7
Now a new problem appears. The indicator "ScaleInd" reading has changed today, but judging by the history, it should change tomorrow. And tomorrow the indicator will be redrawn. That is, it turns out that the signal may work today, but tomorrow it will turn out that there was no such signal.

0
Cone8
 ( 28.45% )
- ago
#8
The Synchronizer is pessimistic by design - it assumes the end of the world at the last bar. Weekly, Monthly, Quarterly, and even Yearly intervals end today, whatever day today is.

But say you're trading a Weekly stock or futures system. Do you run it for signals on Thursday or Friday after the close?

Same thing for Cryptos. Put it in the Strategy Monitor, select Scale: Weekly, schedule the run for 12:00:01 AM Market time, and Activate. It will properly schedule the Next Run for Monday at 12:00:01 AM, which is the time you should be looking for signals if you're trading the system.
0
- ago
#9
There are systems on daily timeframes using weekly timeframe indicators, where weekly indicators are only part of the system. As I understand it, the SCALEIND indicator was created for this.

In addition, on days other than Sunday, the indicator shows the correct value. Apparently, the problem is only on Sunday-Monday.

0
Cone8
 ( 28.45% )
- ago
#10
You're right. Thanks for putting it in context. We'll mark it to investigate.
0
Cone8
 ( 28.45% )
- ago
#11
Should be fixed for Build 35.

0
- ago
#12
By the way, if you test it on weekly timeframes, then something is also wrong.
For example, let's create the following strategy:



Let's choose a weekly timeframe and a dataset of 45 cryptocurrencies.



As a result, only one signal is issued, although there should be 45 signals for entry and exit. For some reason, for all other positions, "the historical data has ended" (?)

0
Cone8
 ( 28.45% )
- ago
#13
What is the order top to bottom of your checked Historical Providers for cryptos? It seems like highest one is missing recent data.

Without changing the configuration, just look at the chart for some of the trades. What's the last date?
0
- ago
#14
I only have one - Binance.



Trades look like this:



But this is only on weekly timeframes. Everything is fine on the daily timeframes. (well, of course, except for the Scaleind indicator, which was fixed in version 35)
0
- ago
#15
This daily timeframe

0
Cone8
 ( 28.45% )
- ago
#16
Okay thanks. Looking into why the Weekly timestamps don't match the data for the bar. Those Weekly bars are marked on Fridays even though they have the data through Sunday. Not sure how that happened!
0
Cone8
 ( 28.45% )
- ago
#17
In order for all the time synchornization to work properly, WL requires and expects end-of-bar timestamps. This is a different convention than we get data from almost all providers, so we have to transform the timestamps. A special transformation needs to occur for the 7-trading-days per week Markets.

We've got this worked out for Build 35. Thanks for spotting it!
0

Reply

Bookmark

Sort