1 (edited by JediTrader 2010-04-29 01:54:03)

Topic: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

Part One:

Hello!

I'm new to the forum.  I already have a trading system developed in Excel.  I'd like to expand the system to include intra-day day trading.  Right now, my system makes one (1) trade per day at 0000 GMT.  I can be far more profitable, if I were able to auto-execute multiple-intra-day trades on each signal given through my system.

My current Excel based system produces dozens of primary signals that are then filtered (ranked & sorted) and used for the Primary (Master) Trade Signal for the day.  Before I even think about switching to FSD, it is very important that I know just how much of my Excel based system is replicable in FSD .  In order to understand this, I will need some answers to some basic questions:

1) How do I work with raw data in FSD? 

This is a HUGE (MASSIVE) question, because it resides at the heart of whether or not I will have the level of flexibility that I need for system translation (replication) into FSD.

Here is a small example of the structure and modeling practice, I use in Excel to produce a trading system: 

I use multiple Excel sheets.  Each sheet in Excel represents a component of the system.  Three (3) sheets are used for the Real Time Database.  Three (3) sheets are used for the Signal Engines.  One (1) sheet is used for Metadata.  One (1) sheet is used for the Trading GUI.  The GUI sheet is Read-Only and I manually enter positions each day at 0000 GMT.  In order to help me determine whether or not I can use FSD, you need to know how I generate Trade Signals.  Without knowing how I do that in Excel, it is impossible to tell me whether or not I can use FSD.

How do I generate Trade Signals in Excel:

In my current Excel based system, I can Link from any Engine to any price point (OHLC) within any bar of data inside the Real Time Database, either to Daily, Weekly or Monthly data.   That is VERY important to know, because it gives me the flexibility to use data from multiple time-frames inside of any Signal Engine (Daily, Weekly or Monthly) and inside of any formula (function) that produces a system Indicator inside of any Engine. 

To improve upon my current system, I need to be able to freely access bars of data from any time-frame (1 Minute, 5 Minute, 15 Minute, 30 Minute, 1 Hour, 4 Hour, 1 Day, 1 Week and 1 Month), such that I can REPLICATE any Indicator or any Signal, regardless of which time-frame (bar of data) that it comes from.  I do not have the ability to reach below the Daily bar of data (time-frame) with Excel, due to DDE topic limitations that come from MT4 (the provider does not maintain DDE topic lower than the Daily bar). 

Before you offer me help, understanding the above is critically important, before you read further.  Thank you for your help!

Part One End:

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

Part Two (cont):

Now, here's how I do it.  This will be a very simple example of how I go from Raw Data, to Numeric Indicator, to Numeric Indicator Cluster and finally to Trade Signal.  I must be able to somehow get the exact same Output (results) in FSD, in the final analysis.  HowI get there might be different in FSD, but the final Output Signal must be the same - whether FSD or Excel.

Excel Model & Architecture:


Database Structure:

Container: Excel Spreadsheet
Links: To three (3) Signal Engines
Rows (Bars) of Data Inside Real Time Database = 750 (tot.)
Row (Bar) Format = OHLC (in four separate and adjacent columns: Column 'A', Column 'B', etc.)
Row (Bar) Date Structure = Ascending (OHLC Ascend by date with Current OHLC always in Row 1)
Database Update: Excel Macro (VbScript)
Real Time Data Source: DDE Linked Topics from Providers DDE Server


Signal Engine Structure

Container: Excel Spreadsheet
Links: Both intra and inter Engine and Real Time Databases
Rows: Contain Engine Logic and Stored Data
Columns: Contain Engine logic and Stored Data
Output Scheme: Cells are Color Coded representing components that are either Long, Short or Off
Tools: Various Dynamic/Static Flags, Switches, Tags and Markers are used for Core Functionality
Output: Numeric Indicators & Clusters, Independent Signals & Clusters and The Primary Trade Signal

Ok, now - how do I get from raw data to trade signal.  Everything inside the system begins with a Function - a mathematical calculation, or a logical (comparative) syllogism.


Signal Engine:

Indicator Properties:

Indicator Name: DailyDynamicScale (DDS)
Indicator Type: Numeric
Indicator Format: 0.0000 (Pips)
Indicator Polarity: Both (positive and negative numbers allowed)
Indicator Spreadsheet Name: SignalEngineOne
Indicator Range (Cell) Location: A1 through A31
Indicator Output (Cell) Location: A33

Signal Engine:

Indicator Function (Excel)

Cell A1 = (1BarOpen-2BarOpen)
Cell A2 = (1BarOpen-3BarOpen)
Cell A3 = (1BarOpen-4BarOpen)
Cell A4 = (1BarOpen-5BarOpen)
Cell A5 = (1BarOpen-6BarOpen)
....
....
....
Cell A30 = (1BarOpen-31BarOpen)


Signal Engine:

Indicator Output

Cell A33 = average(A1:A30)

[assume four (4) of them have been created in the same fashion for the Open, High, Low and Close]


Part Two (cont) End:

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

Part Three (Final):


Note:

In this example, I've just instantiated the Numeric Indicator (DDSOpen) that will be used throughout the system for various purposes and at various times and I can call that variable Numeric Indicator from inside of any other Indicator function.  DDSOpen, DDSHigh, DDSLow and DDSClose, are now ready for use.  However, these are just Indicators - they are NOT a Signals.   I produce the Signal by building Indicator Clusters:


Signal Engine:

Indicator Cluster Properties

Indicator Cluster Name: HarmonicScaleAlpha
Indicator Cluster Type: Text
Indicator Cluster Format: XYZ
Indicator Cluster Spreadsheet Name: SignalEngineOne
Indicator Cluster Range (Cell) Location: B1 through E1
Indicator Cluster Output (Cell) Location: G1
Indicator Cluster Signal (Cell) Location: H1


Signal Engine:

Indicator Cluster Function (Excel)

Cell B1 = Cell A33 (could be as complex a mathematical function as necessary)
Cell C1 = Cell B33 (could be as complex a mathematical function as necessary)
Cell D1 = Cell C33 (could be as complex a mathematical function as necessary)
Cell E1 = Cell D33 (could be as complex a mathematical function as necessary)


Signal Engine:

Indicator Cluster Output (Numeric)

Cell G1 = (sum(A33:B33)/sum(C33:D33))/10000


Signal Engine:

Signal Logic Output (Text)

Cell H1 = if(G1>0,"Long",if(G1<0,"Short","Off"))

That is the basic structure for how trade signals are generated.

In this brief example, I've created four Numeric Indicators (DDSOpen, DDSHigh, DDSLow and DDSClose) and integrated them to produce one Indicator Cluster, that in turn produces one Signal.  At deeper levels within the system, I then go on to create Signal Clusters that in turn produce a single Trade Signal for the Day.  The Trade Signal Cluster logic is fairly complex.

I need to know, not just whether or not I can replicate my system inside FSD for use in FST.  But, I need to strategically think about HOW to transform the Excel model into an FSD model and that cannot be done until I know how to THINK about building my Numeric Indicators, Indicator Clusters, Signals and Signal Clusters inside of FSD - or - to arrive at the same logical output, which should result in a trade being executed by FST.

Therefore, how do I:

a) Access currency pair data row-by-row (bar-by-bar) in FSD?

b) Build mathematical calculations against that data to produce Numeric Indicator Output?

c) Build algorithms (logical-wrappers using IF/AND/OR/NOT/Look-Ups, etc.) that wrap Numeric Indicator Output into Trade Signals that are executable by FST?


FSD/FST needs to give me the ability to:

1) Get the data (OHLC)
2) Calculate the data (building trade tools: Indicators)
3) Algorithmically generate Trade Signals
4) Auto-Execute intra-day trades through my FX Intermediaries trading platform


Thanks again for your help, time and attention!  I appreciate all informed replies.  smile


Part Three (Final) End:

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

Here's a couple pics of different parts of the system that I would like to convert into FSD  (Note: None of these images are current - just examples):


The Real Time Database:

http://i556.photobucket.com/albums/ss3/sj30-2/Avitars/RTDB1.jpg


Signal Engine Core Component:

http://i556.photobucket.com/albums/ss3/sj30-2/Avitars/BasicCalc.png


Signal Engine Output Component:

http://i556.photobucket.com/albums/ss3/sj30-2/Avitars/Markers.png


Tactical Trading Screen GUI:

http://i556.photobucket.com/albums/ss3/sj30-2/Avitars/GUI.png


I have to manually enter trades each day.  I'd like to convert (transform) this through an automated process with as little effort as possible - I've already spent years building this and I don't want to re-create the wheel all over again.  I was hoping that the FSD Object Model was quick, fast and robust enough to handle the conversion process.

Again, thanks!   smile

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

Sorry, no.  This is not for sale.  It never has been and never will be for sale.

I simply want to be able unlock the hidden potential inside the multiple trade scenarios that take place between the Engine update times.  I only get one shot at the market with the manual system each day.  With multiple trade opportunities each day, I can at least double my revenue potential - at least.

6 (edited by fxwinner 2010-04-29 20:49:17)

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

Hello, JediTrader, very impressive! you have done a lot of work. For the last few month I was asking myself, who trades from Excel? and here you are! well done.
The question was due to my interest in API trading as when you going big, always some features for one's system requires which standard trading applications cannot offer.
I wonder have you considered trading directly from Excel itself? Some brokers can support it please look at this page http://forex-automatic-trading-systems. … rs/api.htm
VT trader API can support it, and they have very nice trading platform as well.
If you would like to keep your system to yourself and not code it into C++/MQL, etc. consider trading from Excel itself. I thought Oanda support it , but i was wrong. :-(, moreover they require license for API unless you do $12mil/month.

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

you Probably need to work closely with Mr. Popov himself, it looks like a lot of calculations involved, and as for my knowledge, FSB it is indicators based, so you need to create a custom indicator, but Yes, FSB can look into multiple time frames by changing parameters in indicators (this was discussed previously here)

However, if you can convert your system into some languages like C++,Java,.Net,Mql it would be much easier to use existing platforms which already tested. Consider DukasCopy.

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

Thanks for the reply, I appreciate your effort.

What about Visual Traders Studio for Metatrader?  Do you (or, anyone else here) have any experience with using this application to generate MQL code?  You are correct, there are a ton of calculations that make up my system and a lot of logical wrappers that produce Trade Signals.  Many of the Trade Signals themselves are them clustered to produce hybrid Trade Signals.  So, hand coding all of this in yet another language, is not what I had in mind.

Any thoughts on using VTS to produce the MQL and then using that MQL inside of Forex Strategy Builder to produce the final EA?

Again, Thanks!   smile

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

JediTrader wrote:

Any thoughts on using VTS to produce the MQL and then using that MQL inside of Forex Strategy Builder to produce the final EA?

Again, Thanks!   smile

Nice having quick feedback, at least some one active, here.

1. yes I have VTS, bought it 8 months ago, you can create very complex EAs, I can share Documentation if you like (send PM), but not VTS, however can answer questions.
2. you cannot use MQL with FSB/FST, it is different logic/language (this was answered on the forum).
if you don't want to share your strategy you can ask different programmers to code different modules and then the last one when its done hire another one to combine them and do debugging while you sit next to him and watch what he is doing.

let me know if I answered your questions.

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

JediTrader wrote:

Thanks for the reply, I appreciate your effort.
You are correct, there are a ton of calculations that make up my system and a lot of logical wrappers that produce Trade Signals.  Many of the Trade Signals themselves are them clustered to produce hybrid Trade Signals.  So, hand coding all of this in yet another language, is not what I had in mind.

if you are good with mathematics then you should consider some fundamental tools like
http://www.tradingsolutions.com/
and
http://www.mathworks.com/

you can trade and do computation from these tools. They are massive and can cover all aspects of calculations , and if you need some quick calculations based on massive mathematical formulas, you can export strategy and do it in hardware, but I don't think you have gone so far, as you do it in Excel.

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

JediTrader, if you trading long terms, why you meanwhile just send an email from Excel, it has this capability and you execute the order from mobile device, all brokers support mobile devices nowadays.

Re: Trading System Conversion: Excel to FSD. Part One (Warning Long Post)

hey JediTrader, how is going ... ?
what have you made your mind? as I have  seen you for for a while...