forex

How to re-use value in different functions?

跟風遠走 提交于 2019-12-24 20:14:13
问题 I am programming a Study in MotiveWave, a program used for (day)trading. The study is its own class. (info about MotiveWave's SDK found here: https://www.motivewave.com/sdk/javadoc/overview-summary.html) public class L_V2 extends com.motivewave.platform.sdk.study.Study My study uses 2 different timeframes: the 1 hour and the 4 hour bars. Both are calculated in a different function. Otherwise formulated: both use a different dataseries, as shown in the code below. I have two values, being

Using COUNTIFS formulas when linking worksheets

前提是你 提交于 2019-12-23 01:54:20
问题 I want to be as detailed as possible. So Let me provide you with the look of my spreadsheet Column H Column Q Row 11 YES Win Row 12 NO Win Row 13 YES Loss ... ... Row 61 YES Win The calculation that I used to give me a count of "Winners" is =COUNTIFS(H11:H61,"YES",Q11:Q61,"Win") and the one for "Losses" is =COUNTIFS(H11:H61,"YES",Q11:Q61,"Loss") - seems to be working well. However, this calculation is on sheet Input. I would like to have this calculation done on a totally different sheet

How to set order few pips above order initiation bar in MQL4

左心房为你撑大大i 提交于 2019-12-21 06:42:37
问题 I would like to create a stoploss order that will be placed above the high of the previous order's initiation bar in case this is a Sell order OR below the low of the previous order's initiation bar in case this is a Buy order. Here is a picture to illustrate the issue ( the example depicts a sell order case ): Any idea how to do that? The code below works fine if I use stoploss that is fixed. If I replace the stoploss with variables that are based on High or Low no orders are fired. Here is

Perl - HTTP::Proxy capture XHR/JSON communication

[亡魂溺海] 提交于 2019-12-21 04:39:16
问题 The site http://openbook.etoro.com/#/main/ has an live feed what is generated by javascript via XHR keep-alive requests and getting answers from server as gzip compressed JSON string. I want capture the feed into a file. The usual way (WWW::Mech..) is (probably) not viable because the need of reverese engineering all Javascripts in the page and simulating the browser is really hard task, so, looking for an alternative solution. My idea is using a Man-in-the-middle tactics, so the broswser

Fundamental data based trading algorithms

北城以北 提交于 2019-12-08 08:24:32
问题 Q1: Is it possible to create a script/algorithm that will purely place a BUY or SELL order of a selected currency pair, depending on whether e.g. an interest rate announcement is higher ( or lower ) than the forecast figure? I know many other technical and fundamental factors must be taken in to account before buying and selling financial instruments, but purely as an experiment I'd like to determine if this method is possible. If this can be achieved, Q2: how can an interest rate

Interactions between Expert Advisor and Indicators on MQL4

十年热恋 提交于 2019-12-08 03:40:16
问题 Is it possible to read changes in pre-built indicator (for example: its value changes) through an expert-advisor, and of course - automate the trades based on those reads? What is the function that is responsible for doing this? I have tried to look this up on Google, but it appears I can only do things like track object creation or deletion ... called Chart Events.... maybe I'm missing something? 回答1: Yes, it is possible. MetaTrader4 Terminal is a software platform, that allows you to launch

Using COUNTIFS formulas when linking worksheets

。_饼干妹妹 提交于 2019-12-07 04:56:28
I want to be as detailed as possible. So Let me provide you with the look of my spreadsheet Column H Column Q Row 11 YES Win Row 12 NO Win Row 13 YES Loss ... ... Row 61 YES Win The calculation that I used to give me a count of "Winners" is =COUNTIFS(H11:H61,"YES",Q11:Q61,"Win") and the one for "Losses" is =COUNTIFS(H11:H61,"YES",Q11:Q61,"Loss") - seems to be working well. However, this calculation is on sheet Input. I would like to have this calculation done on a totally different sheet entitled Results. However, my calculation doesn't seem to be working properly. Here is an example of the

How to set order few pips above order initiation bar in MQL4

眉间皱痕 提交于 2019-12-03 21:52:54
I would like to create a stoploss order that will be placed above the high of the previous order's initiation bar in case this is a Sell order OR below the low of the previous order's initiation bar in case this is a Buy order. Here is a picture to illustrate the issue ( the example depicts a sell order case ): Any idea how to do that? The code below works fine if I use stoploss that is fixed. If I replace the stoploss with variables that are based on High or Low no orders are fired. Here is my code: //| Expert initialization function | //+------------------------------------------------------

Perl - HTTP::Proxy capture XHR/JSON communication

倾然丶 夕夏残阳落幕 提交于 2019-12-03 15:48:46
The site http://openbook.etoro.com/#/main/ has an live feed what is generated by javascript via XHR keep-alive requests and getting answers from server as gzip compressed JSON string. I want capture the feed into a file. The usual way (WWW::Mech..) is (probably) not viable because the need of reverese engineering all Javascripts in the page and simulating the browser is really hard task, so, looking for an alternative solution. My idea is using a Man-in-the-middle tactics, so the broswser will do his work and i want capture the communication via an perl proxy - dedicated only for this task. I

Writing an expert adviser in [ MQL4 ]

一曲冷凌霜 提交于 2019-12-01 09:18:30
问题 So if I wanted an EA in MQL4 that took the open price and when current price was 10 pips below the open it places a buy order and when it was 10 pips above the open it sold. Only one order at a time and the open changed daily. Q1: How could that run unstopped? Q2: Would that even be profitable? I know this is simple for some people to write but for me it's depressing. 回答1: A1: the simplest part ... The MQL4 Expert Advisor type-of-code's execution can be principally run unstopped, supposing