Forex Factory (https://www.forexfactory.com/)
-   Platform Tech (https://www.forexfactory.com/forum/69-platform-tech)
-   -   MT4 to Excel through Excel RTD (Finally!) (https://www.forexfactory.com/thread/944826-mt4-to-excel-through-excel-rtd-finally)

Dmh Nov 12, 2020 4:41am | Post# 101

1 Attachment(s)
I am wondering why I see differences on the charts open on mt4 and the open I get in excel RTD anyone familiar with this problem? for example for audjpy I see an open of 76.507 in rtd and a open of of 76.371 on the chart. A difference of 13 pips... Formula I use for open =RTD("fxbluelabs.excelrtd"; ;$B$1;"@bh,AUDJPY,60,open,"&0)
The candle before the candle with an open of 76.371 has an open of 76.507.
Click to Enlarge

Name: bd019595d9ddd7eda74b42dd5c656b07.png
Size: 18 KB

martijn25 Nov 12, 2020 5:00am | Post# 102

{quote} The candle before the candle with an open of 76.371 has an open of 76.507. {image}
I get it now the open is 8.00 but how to get the open of the last candle instead of the open candle of 8.00?

Dmh Nov 12, 2020 5:39am | Post# 103

{quote} I get it now the open is 8.00 but how to get the open of the last candle instead of the open candle of 8.00?
I donít know, Iím not familiar with Excel RTD.

JibalaPasan Nov 12, 2020 1:59pm | Post# 104

{quote} I get it now the open is 8.00 but how to get the open of the last candle instead of the open candle of 8.00?
Read the manual!

2.3.4.3 Bar shift

The final part of the price history formula is the bar "shift", i.e. which bar to get information about. Bars are numbered with the newest at zero, and increasing in order of age. In other words, bar 0 is the current in-progress bar; bar 1 is the last complete bar etc.

Therefore, the close price on bar 0 (for any timeframe) is the current bid price. In effect, the following two formulas are identical:

=RTD("FXBlueLabs.ExcelRTD", , "156734", "bidGBPUSD")
=RTD("FXBlueLabs.ExcelRTD", , "156734", "@bh,GBPUSD,60,close,0")

Best of luck and stay green always!

Jibala

antariks Nov 12, 2020 4:49pm | Post# 105

Hello everyone, I am still looking for a solution for initiating an order (Buy/Sell, close, etc..) based on referencing another cell. For example, if Cell (B10) equals a value, then Buy or sell or close. If anyone has done it, then post your sheet with the embedded VBA/Formula. And I am not referring to Blue Labs sample sheet with clickable buttons. The problem is in referencing another cell. Ultimately, I am looking for a sample sheet that contains different buy/sell/close orders including partial closes so it is a full rounded sheet with all the...
We are pending on this for a long time and no one seems to have a solution
Automation is out of question without this

This is the original code. An additional condition need to be inserted, something like "If A1>0.001"

' Create the FXBlueLabs.ExcelCommand object and send the command
Set cmd = CreateObject("FXBlueLabs.ExcelCommand")
strResult = cmd.sendCommand(strAccount, strCommand, strParameters, lTimeoutSeconds)

martijn25 Nov 13, 2020 4:28am | Post# 106

{quote} Read the manual! {quote} Best of luck and stay green always! Jibala
I did but its not clear for me what formula to use when I want to refer to a current bar.

JibalaPasan Nov 13, 2020 10:42am | Post# 107

{quote} I did but its not clear for me what formula to use when I want to refer to a current bar.
Sorry, but what's not clear on that statement?

In other words, bar 0 is the current in-progress bar; bar 1 is the last complete bar etc.

Best of luck and stay green always!

Jibala

JibalaPasan Nov 13, 2020 2:35pm | Post# 108

2 Attachment(s)
Hello everyone, I am still looking for a solution for initiating an order (Buy/Sell, close, etc..) based on referencing another cell. For example, if Cell (B10) equals a value, then Buy or sell or close. If anyone has done it, then post your sheet with the embedded VBA/Formula. And I am not referring to Blue Labs sample sheet with clickable buttons. The problem is in referencing another cell. Ultimately, I am looking for a sample sheet that contains different buy/sell/close orders including partial closes so it is a full rounded sheet with all the...
Wrong approach!
You should have a strategy at the first. Secondly, test your strategy. This is very important to know if the signals coming from your strategy are good enough. Execute the trades manually from within your Excel Sheet. If everything works fine, think about how to automate the execution thru VBA.

Click to Enlarge

Name: Ashampoo_Snap_2020.11.13_15h30m43s_005_GAP-Scalper-GER30-xlsb.png
Size: 50 KBClick to Enlarge

Name: Ashampoo_Snap_2020.11.13_15h57m12s_006_.png
Size: 74 KB
I think I have a good strategy so far although it's not automated yet. This will come with the next version.

Best of luck and stay green always!

Jibala

mtharwat Nov 13, 2020 7:32pm | Post# 109

{quote} Wrong approach! You should have a strategy at the first. Secondly, test your strategy. This is very important to know if the signals coming from your strategy are good enough. Execute the trades manually from within your Excel Sheet. If everything works fine, think about how to automate the execution thru VBA. {image}{image} I think I have a good strategy so far although it's not automated yet. This will come with the next version. Best of luck and stay green always! Jibala

It is not a wrong approach!

I simply want to create something similar to a money management EA.
For example, I am entering a trade with partial orders and then will do partial closes and each partial lot will have its own trailing stop/step trailing stop after break-even, etc...

I have been trading for almost two decades H4/Daily/Weekly and also M15/H4 intraday trading for forex and stocks. I have a thread for my trading in my other thread https://www.forexfactory.com/thread/...s-and-entering?

With regard to me posting a few ideas about percentage changes, that is to encourage others to learn about Excel and offer them a tool to try our their ideas.
Another thing is that I am trying in my free time (when I am not trading) to create strategies for scalping but this is a different story. Also trying to create a "heads-up" tool based on certain conditions to point me at checking good potential trading setups for intraday or long term without the need to check each chart individually every day and this includes stocks as well!

The main interest for me at the moment is to create a money management tool through Excel.

mattkirby Nov 14, 2020 6:48am | Post# 110

Hi guys, glad to find this thread here

I have a problem hope someone can help me

I want to import M5 data from all the 28 majors (288 for 1 day, open,close,high and low) but after importing 600 - 700 datas my excel alway crashs down.

Is the import of data limited? can I change this somewhere?

Mike

JibalaPasan Nov 14, 2020 8:34am | Post# 111

Hi guys, glad to find this thread here I have a problem hope someone can help me I want to import M5 data from all the 28 majors (288 for 1 day, open,close,high and low) but after importing 600 - 700 datas my excel alway crashs down. Is the import of data limited? can I change this somewhere? Mike
It's hard to give an or the right answer as long as you don't tell us about how you try to import data into M$ Excel.

Best of luck and stay green always!

Jibala

mattkirby Nov 14, 2020 11:21am | Post# 112

I do it via Excel RTD function with metatrader 4.

At some amount of imported data my excel crashes down. Till that point everything works fine........

JibalaPasan Nov 14, 2020 11:55am | Post# 113

I do it via Excel RTD function with metatrader 4. At some amount of imported data my excel crashes down. Till that point everything works fine........
From the RTD manual:

2.3.4.3 Bar shift
[...]
The amount of data available on each timeframe depends on the underlying platform, but will typically be around 250 bars.

Best of luck and stay green always!

Jibala

mattkirby Nov 15, 2020 5:53am | Post# 114

thank you Jibala. I must have overread this......

dodiep Nov 15, 2020 11:53pm | Post# 115

2 Attachment(s)
Hi you guys,
Did you trust this method? when I checked the open price of day and week with ICmartkets, I found that the data was modified.

You see the open price of GU: 1.31664, but the data from RTD is 1.322. I check others also, and give a conclusion: the data can't trust.

How about your RTD with others brokers?
Click to Enlarge

Name: dc91f88f56ec60c778d98553839ad0be.png
Size: 211 KB
Click to Enlarge

Name: 1373383fe3dcc6f25afcde475408285c.png
Size: 197 KB

mtharwat Nov 16, 2020 8:52pm | Post# 116

2 Attachment(s)
Retrieving Indicators Data with "Concat" Function:

Attached a workbook with a number of indicators with Concat function. It is tricky sometimes. If you need other indicators, it will be much easier to just change the indicator name in the formula. For example, @RSI could be @CCI, for indicators that require one input. If you are new to EXCEL in general, look at the dollar sign and see which cells are fixed and which ones are not to learn about it.

Each sheet in the workbook represents a time frame. If you need more time frames, then just copy the sheet (from the bottom tab that has the name of the sheet) and then choose other time frames. I have two sheets already in the workbook.

All you need to do is to type the timeframe you want to retrieve. I found that allocating a sheet for each time frame is easier for referencing cells later on. Each sheet has in its top row fileds including account number, time frame, lookback period (0 for the current bar), and open/high/low/close. you can get high/low data for some indicators. The latter is left at close by default.
NB: After you type your account number, please give the workbook sometime to load the data.

Attachment 3790568
Indicators Data with Concat Function.xlsx

mtharwat Nov 16, 2020 8:55pm | Post# 117

Hi you guys, Did you trust this method? when I checked the open price of day and week with ICmartkets, I found that the data was modified. You see the open price of GU: 1.31664, but the data from RTD is 1.322. I check others also, and give a conclusion: the data can't trust. How about your RTD with others brokers? {image} {image}
Mind if you share with me the exact formula you used. and then I will check it for you.

mtharwat Nov 16, 2020 8:58pm | Post# 118

I do it via Excel RTD function with metatrader 4. At some amount of imported data my excel crashes down. Till that point everything works fine........
There are also other factors involved:
1- The internet speed. It does wonders when it is good. (From Experience)
2- The PC/Laptop capabilities. It makes a difference too based on my experience.

mtharwat Nov 16, 2020 9:01pm | Post# 119

{quote} I did but its not clear for me what formula to use when I want to refer to a current bar.
Hello,
Sorry for my late reply.
Are you still having difficulties? Please let me know.
Have you tried any of the workbooks I have attached here for percentage change and currency strength. Those workbooks have sheets allocated for retrieving data. You can change close to ope, etc.. I believe some of them already have close/open/high/low fileds.

dodiep Nov 16, 2020 11:43pm | Post# 120

Thank mtharwat,
I figured out my problem, due to internet latency and maybe my PC too, so the open price from RTD and history is not the same.
When I restart it several time, it's fine now.


© Forex Factory