Code Monkey home page Code Monkey logo

xml-trade-writer's Introduction

QuickXml Writer lets you get Trades from dukascopy strategy to XML.

Download compiled version at :

https://github.com/downloads/fxmozart/Xml-Trade-Writer/QuickXmlWriter.jar

Basic Strategy using QuickXmlWriter :


https://github.com/downloads/fxmozart/Xml-Trade-Writer/MA_Play.java


-------------------------------
Usage :


To actually use it you must just paste in your strategies :
//At the top of the file like this:
@Library("QuickXmlWriter.jar");
@RequiresFullAccess
public class MyStrategy implements IStrategy{


//Add 2 variables 
public static String SystemName="WINPROF";
public static String MagicNumber = "121266";


Inside On Message add also :


 public void onMessage(IMessage message) throws JFException 
    {
      if (message.getType().equals(IMessage.Type.ORDER_FILL_OK) ||message.getType().equals(IMessage.Type.ORDER_CLOSE_OK))
      { 
			//It auto detects if order is a close or open....
             XMLTrades t = new XMLTrades(MagicNumber,SystemName,message); 
      } 
    }


This will make the XmlWriter class write xml (which can be used for other things like web services, MT4 cloner's, analysis and so forth).

<?xml version="1.0" encoding="UTF-8"?>
<Trade>
    <Symbol>EURUSD</Symbol>
    <Operation>Open</Operation>
    <System>MAPlay</System>
    <EntryPrice>1.31976</EntryPrice>
    <StopPrice>1.21974</StopPrice>
    <LimitPrice>1.32064</LimitPrice>
    <Side>Buy</Side>
    <OrderType>Market</OrderType>
    <TrailingStop>1</TrailingStop>
    <TimeZone>0</TimeZone>
    <DayOfYear>52</DayOfYear>
    <DayOfWeek>3</DayOfWeek>
    <Multiplier>1</Multiplier>
    <MagicNumber>121212</MagicNumber>
    <EntryHours>18</EntryHours>
    <EntryMinutes>55</EntryMinutes>
    <Ticks>1,329,846,933,332</Ticks>
    <EntryDate>2012-1-21</EntryDate>
    <Version>1.3</Version>
</Trade>

xml-trade-writer's People

Contributors

fxmozart avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Forkers

afcarl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.