[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] creating a basket order file



PureBytes Links

Trading Reference Links

o ok ... well for now I can use the simple limit orders in the basket.

if I get into it again (the Java) I let you know. With the free JBuilder however you can not build executables (the programs run only together with the compiler). Never really tried to build an executable from a program made with JBuilder. Probably before I even get going TJ has his stuff ready anyway.

About the extraction. I asked the helpdesk also so I wait for an answer. I'll then do some digging and if no success I come to your method. Thanks

rgds, Ed
  ----- Original Message ----- 
  From: Herman van den Bergen 
  To: amibroker@xxxxxxxxxxxxxxx 
  Sent: Thursday, September 09, 2004 1:12 PM
  Subject: RE: [amibroker] creating a basket order file


  Ed, i think the person was n't talking about basket orders, he spoke of
  conditonal orders.

  I looked at API stuff and it is mind-boggling for me... :-( so i hope some
  expert will do it for us one day.

  let us know how you are doing.

  Some of the data you need can be extracted (perhaps indirectly) from the AB
  tradelist. I did that some time ago...if that is the way you want to go let
  me know and I will do some digging for my code that read the tradelist with
  afl.

  herman.
    -----Original Message-----
    From: ed nl [mailto:ed2000nl@xxxxxxx]
    Sent: Thursday, September 09, 2004 6:45 AM
    To: amibroker@xxxxxxxxxxxxxxx
    Subject: Re: [amibroker] creating a basket order file


    Herman,

    thanks for your reply. I'll go dig in the archives. Indeed the information
  I need is embedded in Amibrokers' internals and I need some way to extract
  it. I think scripting offers a solution so I will have a look. Also I
  remember TJ saying that at some point Amibroker will not need scripting any
  more. So I think at some point we could use AFL to extract info like

    - number of symbols still in portfolio
    - individual symbols still in the portfolio
    - number of shares per symbol in the portfolio
    - exit price of the symbols still in the portfolio for the future bar
    - symbols to be bought the future bar
    - entry price of these symbols
    - etc.

    once we are able to extract this information we could use fopen, fputs etc
  to write them to a file. But I think this is already possible now with
  scripting. I will look in the archives.

    The ordertypes you can put in a basket are limited as I understand but
  just read an Email in AT of somebody who says this is not the case. I
  adjusted my system and for now I could start off sending only limit orders.

    Like you I am planning to look at the API myself. I have learnt basic Java
  a few years ago and will do an attempt to get into it again. In fact I
  installed the free JBuilder compiler yesterday. But I would like to avoid it
  because it is rather specialistic work and I am not a trained programmer
  ....

    rgds, Ed
      ----- Original Message -----
      From: Herman van den Bergen
      To: amibroker@xxxxxxxxxxxxxxx
      Sent: Thursday, September 09, 2004 12:28 PM
      Subject: RE: [amibroker] creating a basket order file


      hello Ed,

      Perhaps components of what you are trying to do are in the archives. If
  you
      run a port backtest and get your next day trades that way you can export
  the
      backtest results and read the last few lines with afl to get all the
  order
      information you need. An Auto-Exporting script was covered during the
  last
      year and I am almost certain that Dingo wrote a script that does this
      automatically. Also, MrDavis also shared Ninja code that may contain
      valuable ideas for the file creation process. You can also use custom
  code
      to extract the top-score tickers to trade, this code was also posted a
      couple of times.

      I think it may be a little more complicated than you assume because AB
  does
      not allow us to access many Portfolio variables through afl code.
  Perhaps
      this will get more attention after the Auto-Order fill feature is
      introduced.

      btw, if i remember correctly, basket orders can not be auto-loaded in
  the
      TWS...also basket orders cannot contain all order parameters, only a few
      limited parameters are possible. I looked at it once as a interim way to
  get
      an auto-forder fill function: it couldn't do what i needed. Also, again,
  if
      i remember correctly, it creates a new basket page on each load, which
  means
      it cannot be used for repeated order modification. I wrote to IB about
  some
      of these things a long time ago but they replied they have no plans on
      making big changes. I guess they expect people to use the API
  interface...

      Sometimes I think that the best way for us to make success in trading is
  to
      take a year off, go to school and learn to program DLLs and API stuff
  :-)

      With regards to your needs, it might help if you listed the steps
  required
      in a 1,2,3... format. I think everything you need was covered on the
  list at
      one time or another.

      best regards,
      herman.
        -----Original Message-----
        From: ed nl [mailto:ed2000nl@xxxxxxx]
        Sent: Thursday, September 09, 2004 12:31 AM
        To: amibroker@xxxxxxxxxxxxxxx
        Subject: Re: [amibroker] creating a basket order file


        hi Dingo,

        for this system I use EOD data with a Buy delay of 1.

        I think the data should somehow be extracted but I do not think it can
  be
      done with AFL yet. Maybe with scripting but I wouldn't know how to do
  it,

        rgds, Ed

          ----- Original Message -----
          From: dingo
          To: amibroker@xxxxxxxxxxxxxxx
          Sent: Thursday, September 09, 2004 3:09 AM
          Subject: RE: [amibroker] creating a basket order file


          are you working with eod?  what delay are you using?

          d


            _____

          From: ed nl [mailto:ed2000nl@xxxxxxx]
          Sent: Wednesday, September 08, 2004 5:57 PM
          To: amibroker@xxxxxxxxxxxxxxx
          Subject: Re: [amibroker] creating a basket order file


          hi Dingo,

          yes I know these functions but how do I use them and tell them to
  output
          what to buy and sell on the last day of the backtest. For instance
  the
          simple system below. How do I create this particular output using
  these
          functions?

          rgds, Ed


          // simple sys
          SetOption("InitialEquity", 100000 );
          SetOption("MaxOpenPositions", 4 );

          PositionSize = -25;
          SetTradeDelays(1,1,1,1);

          Buy = Cross(RSI(14),30);
          Short = Cross(70,RSI(14));
          BuyPrice = O;
          SellPrice = O;
          Sell = 0;
          Cover = 0;

          ApplyStop( stopTypeNBar,stopModeBars,5,ExitAtStop = 1,Volatile =
  False,
          ReentryDelay = 1 );

          ShortPrice = O;
          CoverPrice = O;

          PositionScore = 50-StochK(14);

            ----- Original Message -----
            From: dingo
            To: amibroker@xxxxxxxxxxxxxxx
            Sent: Wednesday, September 08, 2004 11:36 PM
            Subject: RE: [amibroker] creating a basket order file


            File Input/Output functions

            *      fclose
            <mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/fclos
  e.ht
      ml>
            (File Input/Output functions) - close a file (AFL 2.5)

            *      feof
            <mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/feof.
  html
      >
            (File Input/Output functions) - test for end-of-file (AFL 2.5)

            *      fgets
            <mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/fgets
  .htm
      l>
            (File Input/Output functions) - get a string from a file (AFL 2.5)

            *      fopen
            <mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/fopen
  .htm
      l>
            (File Input/Output functions) - open a file (AFL 2.5)

            *      fputs
            <mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/fputs
  .htm
      l>
            (File Input/Output functions) - write a string to a file (AFL 2.5)

            From the help file..

            d


              _____

            From: ed nl [mailto:ed2000nl@xxxxxxx]
            Sent: Wednesday, September 08, 2004 5:29 PM
            To: amibroker@xxxxxxxxxxxxxxx
            Subject: [amibroker] creating a basket order file


            hi,

            I am trying to make a basket order file for Interactive Brokers. I
  use
      a
            portfolio type backtest and I would not know how to be able to
      influence
          the
            output. The output file would contain something like this

            BUY, 100, MSFT, STK, SMART, LMT, 52.85,
            BUY, 100, FITB, STK, SMART, LMT, 58.25,
            SELL, 100, AAPL, STK, SMART, LMT, 30.22,
            COVER, 100, BRCM, STK, SMART, LMT, 15.55,
            SHORT, 100, PETM, STK, SMART, LMT, 22.44,

            any ideas?

            thanks, Ed

            [Non-text portions of this message have been removed]



            Check AmiBroker web page at:
            http://www.amibroker.com/

            Check group FAQ at:
            http://groups.yahoo.com/group/amibroker/files/groupfaq.html



            Yahoo! Groups Sponsor

            ADVERTISEMENT


          <http://us.ard.yahoo.com/SIG=129rgo6f9/M=295196.4901138.6071305.3001
  176/
      D=gr

          oups/S=1705632198:HM/EXP=1094765382/A=2128215/R=0/SIG=10se96mf6/*htt
  p://
      comp
            anion.yahoo.com> click here


          <http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=g
  roup
      s/S=
            :HM/A=2128215/rand=850822541>


              _____

            Yahoo! Groups Links


            *      To visit your group on the web, go to:
            http://groups.yahoo.com/group/amibroker/


            *      To unsubscribe from this group, send an email to:
            amibroker-unsubscribe@xxxxxxxxxxxxxxx
            <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>


            *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      Service
            <http://docs.yahoo.com/info/terms/> .




            [Non-text portions of this message have been removed]



            Check AmiBroker web page at:
            http://www.amibroker.com/

            Check group FAQ at:
          http://groups.yahoo.com/group/amibroker/files/groupfaq.html


                  Yahoo! Groups Sponsor
                        ADVERTISEMENT





          --------------------------------------------------------------------
  ----
      ----
          --
            Yahoo! Groups Links

              a.. To visit your group on the web, go to:
              http://groups.yahoo.com/group/amibroker/

              b.. To unsubscribe from this group, send an email to:
              amibroker-unsubscribe@xxxxxxxxxxxxxxx

              c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      Service.




          [Non-text portions of this message have been removed]



          Check AmiBroker web page at:
          http://www.amibroker.com/

          Check group FAQ at:
          http://groups.yahoo.com/group/amibroker/files/groupfaq.html



          Yahoo! Groups Sponsor

          ADVERTISEMENT

          <http://us.ard.yahoo.com/SIG=129jv5ch6/M=295196.4901138.6071305.3001
  176/
      D=gr
          oups/S=1705632198:HM/EXP=1094767034/A=2128215/R=0/SIG=10se96mf6/*htt
  p://
      comp
          anion.yahoo.com> click here

          <http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=g
  roup
      s/S=
          :HM/A=2128215/rand=384412153>


            _____

          Yahoo! Groups Links


          *      To visit your group on the web, go to:
          http://groups.yahoo.com/group/amibroker/


          *      To unsubscribe from this group, send an email to:
          amibroker-unsubscribe@xxxxxxxxxxxxxxx
          <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>


          *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      Service
          <http://docs.yahoo.com/info/terms/> .




          [Non-text portions of this message have been removed]



          Check AmiBroker web page at:
          http://www.amibroker.com/

          Check group FAQ at:
      http://groups.yahoo.com/group/amibroker/files/groupfaq.html


                Yahoo! Groups Sponsor
                      ADVERTISEMENT





        ----------------------------------------------------------------------
  ----
      ----
          Yahoo! Groups Links

            a.. To visit your group on the web, go to:
            http://groups.yahoo.com/group/amibroker/

            b.. To unsubscribe from this group, send an email to:
            amibroker-unsubscribe@xxxxxxxxxxxxxxx

            c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      Service.



        [Non-text portions of this message have been removed]



        Check AmiBroker web page at:
        http://www.amibroker.com/

        Check group FAQ at:
      http://groups.yahoo.com/group/amibroker/files/groupfaq.html


              Yahoo! Groups Sponsor
                    ADVERTISEMENT





      ------------------------------------------------------------------------
  ----
      --
        Yahoo! Groups Links

          a.. To visit your group on the web, go to:
          http://groups.yahoo.com/group/amibroker/

          b.. To unsubscribe from this group, send an email to:
          amibroker-unsubscribe@xxxxxxxxxxxxxxx

          c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
  Service.



      [Non-text portions of this message have been removed]



      Check AmiBroker web page at:
      http://www.amibroker.com/

      Check group FAQ at:
  http://groups.yahoo.com/group/amibroker/files/groupfaq.html


            Yahoo! Groups Sponsor
                  ADVERTISEMENT





    --------------------------------------------------------------------------
  ----
      Yahoo! Groups Links

        a.. To visit your group on the web, go to:
        http://groups.yahoo.com/group/amibroker/

        b.. To unsubscribe from this group, send an email to:
        amibroker-unsubscribe@xxxxxxxxxxxxxxx

        c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
  Service.



    [Non-text portions of this message have been removed]



    Check AmiBroker web page at:
    http://www.amibroker.com/

    Check group FAQ at:
  http://groups.yahoo.com/group/amibroker/files/groupfaq.html


          Yahoo! Groups Sponsor
                ADVERTISEMENT





  ----------------------------------------------------------------------------
  --
    Yahoo! Groups Links

      a.. To visit your group on the web, go to:
      http://groups.yahoo.com/group/amibroker/

      b.. To unsubscribe from this group, send an email to:
      amibroker-unsubscribe@xxxxxxxxxxxxxxx

      c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  [Non-text portions of this message have been removed]



  Check AmiBroker web page at:
  http://www.amibroker.com/

  Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 


        Yahoo! Groups Sponsor 
              ADVERTISEMENT
             
       
       


------------------------------------------------------------------------------
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/
      
    b.. To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/