Forex Factory (https://www.forexfactory.com/forum.php)
-   Recycle Bin (https://www.forexfactory.com/forumdisplay.php?f=17)
-   -   Plot long/short retail positions (from myfxbook) on MT4 chart (https://www.forexfactory.com/showthread.php?t=915949)

hanover Jun 21, 2019 11:31pm | Post# 21

1 Attachment(s)
The EU,H1 chart below illustrates the same type of retail trader behavior yet again. (For anybody new to this thread, the plots on the chart were created by software — that can be downloaded for free from post #1 — that scrapes retail trader data from myfxbook's community page: https://www.myfxbook.com/community/outlook).

EU has been rising following the unexpectedly dovish Fed 48 hours ago. But retail is typically unimpressed by trends created by FA. Instead — for better or worse — it looks to trade counter trend, in the face of probable market drivers, by attempting to sell at what it guesses might be highs, and likewise buy at lows.

To the chart: Retail buy volumes on EU (the solid green line on the main chart) drop significantly in the hour following the green candle immediately prior to the second dotted vertical line. This was the time of the Fed release. Note how selling volumes (solid red line) follows price with uncanny accuracy all the way up, lagging by an hour or two as it takes retail traders time to react. The dashed green and red lines show the % of volume that is long and short respectively (see the scale at the LHS). Buy volumes have fallen from above 80% to below 10%, a total U-turn, and entirely against the price move. The solid silver line is the net retail volume (long minus short), and further highlights the counter trend nature of the retail mindset. The yellow line is the total retail volume (long+short).

The solid light blue and magenta lines represent the average retail buying and selling prices, respectively. Note how both are currently under water. The average selling price has increased as more retail traders sell at the then current price. I understand that many traders add to existing losses by averaging down.

In the chart subwindow, you can see how this affected the total USD (white line) and EUR (pink line) volumes. The EUR volume mirrors the selling volume in the main chart. The correlation between currencies and major pairs is very high all the way across the chart, for obvious reasons.

This retail behavior isn't just frequent, it happens continuously and with predictable regularity. If the goal in fx was to predict increases and decreases in retail volumes ahead of time, obtaining risk-free returns would be child's play. However, for better or worse, the retail traders occasionally profit (and likely at the expense of some contrarians who are attempting to oppose them), if the market oscillates sideways in a way that allows their averaged down entries to reach breakeven and beyond.

Two advantages offered by the study of retail behavior over TA: (1) it is a measure that is genuinely independent of price (whereas all technical indicators and line studies are derived from price); (2) retail volumes provide one value that's independent of timeframe, whereas with TA you potentially find uptrends, downtrends, or sideways moves in different TFs, or other simultaneous conflicting reasons to buy and sell.

Conversely, some good news for skeptics: if you'd ignored retail volumes, and simply bought when the EMA(34) (the solid ochre line) turned upward at the first dotted vertical line, you'd have front run the 'contrarians' by about 4 hours, and currently been up 150+ pips, by merely using a very simple trend following approach. And you'd have beaten the savvy FA trader who traded the Fed outcome, by a similar margin. Perhaps the 'market' anticipated the Fed, or perhaps heavyweight traders created net buying pressure a host of other unknown reasons.

Of course we could combine both TA and contrarianism by buying while the EMA is rising and the silver line in the main chart is falling; and vice versa for selling.

For more examples, and an in-depth analysis of retail behavior, read the PDF attached to post #1.
Click to Enlarge

Name: PPI 219.png
Size: 74 KB

akash14 Jun 24, 2019 1:08am | Post# 22

1 Attachment(s)
Hanover i had changed the setting as u told. As data is downloaded in MQL4\Files\myfxbookdata but still it not reflecting in mt4. Kindly chk details in screen if u can fix it. Thanks mak {image} {image}
change .ini file UpdateEveryXminutes=0 to any minutes and chart will update. But mine looks different than instruction book for some reason even after changing mt4, local time.
Click to Enlarge

Name: Screenshot2.png
Size: 50 KB

peterbabs Jun 25, 2019 6:07am | Post# 23

Hi Hanover!
Trust you're making money

If you get to see this, I'd appreciate your response. I check the update often

What's the function of Suspend Hotkeys and Pause Script?
... I'm trying to determine which one will not stop the writing of data into the files the indicator is accessing.

Also, I'd love to see $$_netVolume_[XAU].csv in the files and display it in the indicator window. What do I need to do? I'd appreciate your help.

Thanks for the good work, always.

peterbabs Jun 26, 2019 6:37am | Post# 24

{quote} See my earlier reply in post #1. Volumes for XAU are starting to come through as data gradually gets gathered, although I expect that these will fluctuate more than the currencies, because there are only 3 contributing instruments (compared to 7), and the USD component is a HUGE portion of it. Chart below is H1, with UpdateEveryXminutes=60 in the myfxoutlook.ini file. {image}

Thanks, Hanover!
It's working!
Grateful!!!

hanover Jul 7, 2019 8:30pm | Post# 25

2 Attachment(s)
[Note to anybody following this thread: this is a completely unrelated topic]

Is there any MT4 or Excel tool that can graphically display the data. For example, I have got this information stored in the attached cv file.
I'm not offering a programming service (I'm not even supposed to be posting any more, hence I've replied in the recycle bin), but I have an indicator (Plot External Data) that, with a small modification, should do what you're looking for. That's assuming I understand you correctly. Basically it will take any csv file in ..../MQL4/Files/ that's formatted as date time;value on each line, with the lines in chronological order, and then plot the values as a timeseries under the correct MT4 candles.

It's written using MT4 build 509 which means I'm restricted to 8 buffers (plots). Hence I've modified it to plot the first 7 values in your file (EURGBP; GBPAUD; GBPCAD; GBPCHF; GBPJPY; GBPNZD; GBPUSD) in different colors, and then the 8th value plotted (gray line) is the number of pairs multiplied by +1 if "Up" or -1 if "Down".

The values for each plot don't change very often, and for much of the time the values of different plots are the same, hence the plots tend to plot over the top of each other. To get around the latter, set the SeparatorFactor to something like 0.02 or 0.05 which will 'split' the plots apart by a small amount (see screenshot).

I don't know how your csv file is generated, but I suggest you reduce it to a maximum of something like 2000 lines, as attempting to plot too much data may slow, freeze or even crash MT4. **

I'm not sure that I understood you correctly, but please feel welcome to give it a try. I don't have time to get too involved with FX-related programming projects nowadays, so this is a one-off that's offered FREE on an 'take it as is, or leave it' basis. As always, download and run it at your own risk, as I can't accept liability for any computer damage or financial losses.
_____________________________

** [EDIT] To work around this, I added one new setting: PointsToPlot. If you set it to (for example) 2000, the indicator should plot only the last 2000 datapoints in your csv file. However, there will be a delay, especially if the file is large, while the indicator initially parses the file to count the number of datapoints. Also, regardless of this setting, the max number of datapoints that can be plotted is 9998.
Click to Enlarge

Name: PPI 393.png
Size: 44 KB
Plot External Data simnz.ex4

simnz Jul 7, 2019 11:44pm | Post# 26

[Note to anybody following this thread: this is a completely unrelated topic] {quote} I'm not offering a programming service (I'm not even supposed to be posting any more, hence I've replied in the recycle bin), but I have an indicator (Plot External Data) that, with a small modification, should do what you're looking for. That's assuming I understand you correctly. Basically it will take any csv file in ..../MQL4/Files/ that's formatted as date time;value on each line, with the lines in chronological order, and then plot the values as a timeseries...
Thank you for your kindness.

simnz Jul 8, 2019 4:14am | Post# 27

1 Attachment(s)
[Note to anybody following this thread: this is a completely unrelated topic] {quote} I'm not offering a programming service (I'm not even supposed to be posting any more, hence I've replied in the recycle bin), but I have an indicator (Plot External Data) that, with a small modification, should do what you're looking for. That's assuming I understand you correctly. Basically it will take any csv file in ..../MQL4/Files/ that's formatted as date time;value on each line, with the lines in chronological order, and then plot the values as a timeseries...
I am not sure if MT4 tool may be able to display the symbol's price curves and help me to analyse the momentum data collected by me through random entry.
Click to Enlarge

Name: The data is useful in identifying momentum or market manipulation.jpg
Size: 539 KB

hanover Jul 8, 2019 6:10am | Post# 28

I am not sure if MT4 tool may be able to display the symbol's price curves and help me to analyse the momentum data collected by me through random entry.
I'm not sure whether MT4 would be the best tool, it depends on the details of exactly what analysis you want to do.

Anyway, it sounds like a significant piece of work, sorry I don't have the time for it. I'm having a rest from FX at the moment, to work on other projects.

simnz Jul 8, 2019 7:32am | Post# 29

{quote} I'm not sure whether MT4 would be the best tool, it depends on the details of exactly what analysis you want to do. Anyway, it sounds like a significant piece of work, sorry I don't have the time for it. I'm having a rest from FX at the moment, to work on other projects.
I agree with you MT4 won't be of much help. I did not have any intention of disturbing your rest.
Thank you.


© Forex Factory