In first place i wish to apologise the fact some readers are expecting i will write about the use of indicators on strategies in this articles as i said before. I need to study more about them to try to do better articles about this theme. But surelly they will come. In this month article i will present you a tool for JForex to allow us to do manual trading in Historical Tester. You may not see any advantage on this, but for me is very important because i have a full time job, also other projects and i can't always be on front of the screen. Sometimes i can, but doing other things where i can't be focused on the charts. I can have some "quality" screen time where i can get focused on the charts at weekends and sometimes at night (my time zone is GMT DST), but at this time the market is closed or going slowly with the asian sessions. With this limitations on mind i tried to find a way to trade on the market at more volatile market periods (London and New York sessions) when i have time available but the only thing i find for JForex is a strategy created by the user "Kirilla" (you can see about it here). But this strategy is very limited with errors and don't do what i pretend (almost a trade system on Historical Tester). This way, as exercise, i tried to develop a strategy to do what i want with my specifications. This way i need a fraction of time needed to see if a manual trading system works and don't need to wait for the market to develop as i can get it to run faster. In this article i will present to you the resulting strategy, how it works and in next article how i made it.

Image 2: Strategy running.

MyOfflineTrades - Trade when you can or when you want.

This strategy is available at the correspondent article thread on the forum here, where you can download it for your use. In next article i will provide and explain the source code of the strategy.
To run this strategy there are some needed steps to run it the intended way. In first place you need to open the "Historical Tester" tab. For this go to "Tools" menu and after click on "Historical Tester" on submenu. A bottom tab like the one on the bottom of next image appears.

Image 3: Steps to run the strategy.

Image 3 legend and explanation:

  • 1 - Click on "Open" buttom and find the folder where you have the strategy. Select it and click open;
  • 2 - Define the account settings, usually you only need to set the inicial balance to the value you want to trade with;
  • 3 - Select the pair or pairs you want the historical feed to be available to your trades - select only the one you want to trade to avoid unnecessary overload on Dukascopy servers;
  • 4 - Select the period interval or define a custom one for the period you want to test manual trades;
  • 5 - Disable "Equitity" and "P/L" checkboxes, we don't want and don't need them. Select the time frame for the chart you want to use and enable "Show reports". This way when we stop the strategy we have a final report showed on our browser. Also, if you want you can save the strategy messages (not needed) and the final report refered before to a folder of your choice;
  • 6 - Enable "Visual mode" checkbox and disable "Optimization" and "Show messages" checkboxes. This way our strategy runs with the pair chart visible;
  • 7 - Set the "Test speed" to minimum at the left. Later you can turn the "flow" of the market fastest or slowest to meet your needs. After that, you can hit "run" button to run the strategy with the desired settings.
  • A - After we hit "run" we need to select the pair we want to use to test manual trades. This pair must match the one selected in step 3 or one of the selected ones in this step. After that we get our strategy running as showed in image 2 but without any trades in the bottom table in the strategy window.
Now i need to explain how this strategy works. On next image i explain the strategy window and what do each of the items on this window. With this strategy you can do manual trades on "Historical Tester" as you do on JForex on real time with the historical data feed that occurred on real time on the past on the selected interval. You don't have all the options you have on real time trading but only the ones that meet my needs (but you have a interessing one among others - the possibility to set Stop Loss and Take profit in pips value (not possible on JForex) or in price value as JForex do the usual way). I need the ability to place instant trades at market prices and the possibility to do conditional pending orders based on bid or ask price. Also i need the possibility to use Stop Loss and Take Profit at manual order creation or not at all. Change the Stop Loss and Take Profit along the order flow is other requirement. Finally i want the possibility to close the order manually when i want. All this requirements are filled on this strategy "myOfflineTrades" for "Historical Tester". I'm thinking on the possibility to present a report at any desired moment with all the trades closed, related prices, profit/loss etc, but i don't have initiated that development neither know if i will do it because i can get similar data with the final report provided by the "Historical Tester" when strategy stops. Also if you have any suggestion, just say in article comments or in the articles series thread on the forum and if i think that suggestion it is a "must" i will try to develop it.

Dissecting the window of myOfflineTrades

Image 4: On this image i explain bellow all the strategy window items (on the left) and the option windows for changing Stop Loss and Take Profit respectively after order submition (at center). At the left of the image we have one example of the strategy running where we have two orders closed, three orders submited where two of them are filled (one with profit and one with loss) and one pending order waiting to trigger if the conditions are meet. Also we can see the Stop Loss and Take Profit prices on the red circles if the orders have them. On the green circle we have the price of the pending order and it will be filled when price reach the specified price.

The legend of myOfflineTrades window:
  • 1 - Bid price at any given moment. This value is the value of the last tick bid price;
  • 2 - Ask price at any given moment. This value is the value of the last tick ask price;
  • 3 - Sell Buttom: you know what this button do - submits a Sell order;
  • 4 - Buy Buttom: you know what this button do - submits a Buy order;
Note on "Sell" and "Buy" bottom: Don't try to submit orders as a machine gun fires. Each order is processed on each tick event and and if we are on slow market time and with slow speed (near real time) that can need some time to submit the order. Hit again one of the buttoms after the order appears on the bottom table of orders. If you do it too fast, the strategy maybe get's "confused" and weird things can occur .
  • 5 - Order type selection (default @market) - In this area we have three options: "@market" selected the order is submited at market price, and we have the "Entry" box disabled because it don't is needed; "Bid Price" selected the order is submited at bid price filled on the enabled "Entry" box; "Ask Price" selected the order is submited at ask price filled on enabled "Entry" box. Both of last two options are used for conditional pending orders;
  • 6 - Entry box (disabled by default as we have "@market" by default): Enabled box when we select "Bid Price" or "Ask Price". We fill the price we want to submit on the pending order. If the price conditions aremeet at order submition the order is instantly filled at market price.
  • 7 - Amount box (value considered in millions of currency unit): Before any order submition we must define the amount value used for order submit on buy or sell.

Unfortunatly my article space is on the end once again. I will split this article on two again. I will try to manage the time to submit both of them without any delay. I think Dukascopy need to implement a greater word value limit for the articles submited.

I hope you like this article and find useful the corresponding strategy.

Trade well and good luck.

Translate to English Show original