¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date

Datafeed TWS to Fibonacci Trader - PLEASE HELP!!!!!

cprins1408
 

I have problems with a lot of data vendors (inaccurate or no data)
so I want to "grab" the data out of TWS

I know it works with Excel, now I want to use it in Fibonnaci Trader
.
Fibonacci Trader also works with DDE and DDE2 links but I don't have
knowledge of data feeds, api's, dde's at all

In Fibonacci trader I have to specify:
server name
topic
symbol

IB doesn't help, they only gave me the link to this discussion
board.

Do you know a way to get data in Fibonacci Trader? I only need the
last price.

If hope you can help me, many thanks in advance.

Regards,

Cees Prins
The Netherlands


1 Month Old Today & 406 Members

marinindextrader
 

We are 1 Month Old Today

Oohrah

Scott


Must Have Features

tripack44
 

Below are listed some of the features that are critical to a trading
interface (for me). Please add items that are important to you so we
can compile a list of best features.

Order Types:
------------
Market
Limit
Stop
Trailing Stops
Stop Limit
MIT

Cancel All open orders
Buy All (buy predetermined amount of each market)
Sell All (sell predetermined amount of each market)
Exit all open positions (go flat everything)
Simple up/down keys to quickly increase/decrease price and
shares/contracts for open orders.
Always on top option
Compact Mode (to maximize screen real estate)
Ability to Edit/Delete/Manually enter trades


Trade Log including the following fields
---------------------------------------
Symbol
Date/Time
Position
Buy/Sell amount
Price
P&L/Loss
Cumulative P&L/Loss
Max Open Position P&L
Max Open Position Drawdown

Statistics to analyze performance:
----------------------------------
Total Net Profit Profit Factor
Gross Profit Gross Loss
Max Open Drawdown Max Closed Drawdown

Total Trades Percent Profitable
Winning Trades Losing Trades
Scratch Trades Scratch Trades %
Total Commissions Commiss % of Gross

Largest Winner Largest Loser
Average Winner Average Loser
Avg Win/Loss Ratio Average Trade

Max Consec Winners Max Consec Losers
Total Shares Traded Max Shares Traded
Avg Shares Traded Expected Return


Re: My project...

cyberbri_2000
 

Hi Brian,
Very interesting ... .
Have you backtested the stratagy that you described here and care to
share the results?
Thanks
-weidong
I've been using a strategy of finding stocks with the best fundamental
growth indicators showing short term technical strength for many
months. The only "official" test I've done is a portfolio at
Marketocracy.com, where you need to use the SEC diversity rules and
other rules to qualify for a ranking... that's up around 7 percent
over the last 5 months. Not stellar but when I consider the market
lately I'm quite pleased with it.

Trading my own money at IB with TradeButler will be quite different of
course. I'm constantly tweeking, so I really have nothing concrete to
share with anyone.

Brian


Re: My project...

 

Hi Brian,

Very interesting ... .

Have you backtested the stratagy that you described here and care to
share the results?

Thanks

-weidong

--- In twsapi@y..., cyberbri_2000 <no_reply@y...> wrote:
I wrote my interface this weekend, and I thought I'd post a
screenshot in the files section and let you all know what I'm
doing.
Maybe it'll help others with ideas or whatever. Here's the
screenshot...



A quick summary of the program is this.. it monitors a list of
stocks
throughout the day, testing for stength with TraderBot's short
term
timing tool (traderbot.com), then buys the stocks that pass that
strength test. It also tracks the bought stocks with a trailing
stop
based on each stock's 14-day Average True Range and will sell any
stocks that go below the stop price.

Each weekend I'll make a "bucket" of 20 stocks that I want to
consider for trading the following week. These stocks are read
from
a text file when TradeButler starts and put in the Bucket grid.
It
also gather's account info... Cash Balance and Stock Value.

"Max Held" is how many stocks I want to own at any one time, and
the "Keep %" is the percentage of my total cash account I want to
leave as cash. Based on those figures, the "Next Buy" tells you
the
cash that will be spent on each stock. "ATR x" is the ATR mutiple
for the sell stop. The lower the number the tighter the stop will
trail to the stock price.

Once per minute the program grabs the current TraderBot value from
TraderBot.com and places that score in the "Rank" column in the
Bucket grid. 1 is the weakest, 5 the strongest. The +, - and =
symbols in the "Trend" column tracks if the Rank value increases,
decreases or stays the same oer time.

A market buy order is placed if the Rank value is 4 or 5 and the
last
trend is a + sign. The stock symbol is then taken from the Bucket
grid and put in the "Bought" grid, then the trailing stop is
calculated and put in the "Sell$" column. Other values there are
the
bought price (Buy$), current 14-day ATR (ATR) and shares bought
(Shares).

Each minute the sell stop is updated and checked against the
current
price. If the stop is equal or above the current price a market
sell
order is sent and then the symbol removed from the Bought grid.

My Bucket stocks this week are picked with other programs. I
picked
from the S&P 100, 500, Nasdaq 100 and Dow 30, stocks with...

- Postive EPS Growth over the past year
- Postive Earnings compared to its Industry
- Postive Earnings Suprises Growth over the past year
- Postive Estimates Growth over the past year
- Postive Income Growth over the past year
- Postive Revenue Growth over the past year
- Positive Analyst Target
- TraderBot Short Term Timing score greater than 1
- Positive Quicken.com Stock vs. Industry Evaluator

Here's those picks...
HRB BBBY LTD WLP FDO COF KSS MHP BMET AIG BRCD MERQ FRX MCHP YHOO
CEFT HI ESRX ABC HDI

That's about it... I'm excited to see how this works! I may add
lots
of other features into this, like only consider buys starting an
hour
after open to an hour before close (an easy time check could
accomplish that). I also may test a few of the major index stocks
(QQQ, etc.) and look at their short term strength before
considering
any buys... that's probably my next feature to add.

So far it's working great with the demo system (when it's up and
running that is.. ugh!) I still have to code the section that
removes the sold stock from the bought grid, and of course I want
to
test it alot this week before going live with my account.

I hope this helps generate some interest and/or ideas for the
group!
I'll post my progress every so often, especially if I uncover any
quirks with the API.

Brian


Re: twsapi: My project...

Richard Foulk
 

Thanks for the description, Brian. Very interesting.

} [...]
}
} So far it's working great with the demo system (when it's up and
} running that is.. ugh!) I still have to code the section that
} removes the sold stock from the bought grid, and of course I want to
} test it alot this week before going live with my account.
}

This is where a realtime demo mode would be helpful. The ability to
test everything during market hours on real data without risking funds
makes lots of sense.

You know that's the way IB would do their own testing.


Richard


Re: New Project Uploaded for VB6: AutoConnect

tripack44
 

Thanks for the positive feedback, and I'm glad you like it!


--- In twsapi@y..., "qnolte" <q1@n...> wrote:
I just downloaded your program and tested it. It worked great! I
do
options trading and Stop and Stop Limit orders on options do now
work
well because the last price activates the stop order but the bid
price executes the order which is frequently far below the stop
price. I wrote a vb program to monitor the prices and set moving
stops but the TWS requires a confirmation on option orders and I
can't sit there all day to hit the confirmation. Your program
solves
this problem for me. Thank you very much.


My project...

cyberbri_2000
 

I wrote my interface this weekend, and I thought I'd post a
screenshot in the files section and let you all know what I'm doing.
Maybe it'll help others with ideas or whatever. Here's the
screenshot...



A quick summary of the program is this.. it monitors a list of stocks
throughout the day, testing for stength with TraderBot's short term
timing tool (traderbot.com), then buys the stocks that pass that
strength test. It also tracks the bought stocks with a trailing stop
based on each stock's 14-day Average True Range and will sell any
stocks that go below the stop price.

Each weekend I'll make a "bucket" of 20 stocks that I want to
consider for trading the following week. These stocks are read from
a text file when TradeButler starts and put in the Bucket grid. It
also gather's account info... Cash Balance and Stock Value.

"Max Held" is how many stocks I want to own at any one time, and
the "Keep %" is the percentage of my total cash account I want to
leave as cash. Based on those figures, the "Next Buy" tells you the
cash that will be spent on each stock. "ATR x" is the ATR mutiple
for the sell stop. The lower the number the tighter the stop will
trail to the stock price.

Once per minute the program grabs the current TraderBot value from
TraderBot.com and places that score in the "Rank" column in the
Bucket grid. 1 is the weakest, 5 the strongest. The +, - and =
symbols in the "Trend" column tracks if the Rank value increases,
decreases or stays the same oer time.

A market buy order is placed if the Rank value is 4 or 5 and the last
trend is a + sign. The stock symbol is then taken from the Bucket
grid and put in the "Bought" grid, then the trailing stop is
calculated and put in the "Sell$" column. Other values there are the
bought price (Buy$), current 14-day ATR (ATR) and shares bought
(Shares).

Each minute the sell stop is updated and checked against the current
price. If the stop is equal or above the current price a market sell
order is sent and then the symbol removed from the Bought grid.

My Bucket stocks this week are picked with other programs. I picked
from the S&P 100, 500, Nasdaq 100 and Dow 30, stocks with...

- Postive EPS Growth over the past year
- Postive Earnings compared to its Industry
- Postive Earnings Suprises Growth over the past year
- Postive Estimates Growth over the past year
- Postive Income Growth over the past year
- Postive Revenue Growth over the past year
- Positive Analyst Target
- TraderBot Short Term Timing score greater than 1
- Positive Quicken.com Stock vs. Industry Evaluator

Here's those picks...
HRB BBBY LTD WLP FDO COF KSS MHP BMET AIG BRCD MERQ FRX MCHP YHOO
CEFT HI ESRX ABC HDI

That's about it... I'm excited to see how this works! I may add lots
of other features into this, like only consider buys starting an hour
after open to an hour before close (an easy time check could
accomplish that). I also may test a few of the major index stocks
(QQQ, etc.) and look at their short term strength before considering
any buys... that's probably my next feature to add.

So far it's working great with the demo system (when it's up and
running that is.. ugh!) I still have to code the section that
removes the sold stock from the bought grid, and of course I want to
test it alot this week before going live with my account.

I hope this helps generate some interest and/or ideas for the group!
I'll post my progress every so often, especially if I uncover any
quirks with the API.

Brian


Re: automated login

 

This could easily be modified to respond to any dialog box, but there
is no place to return the message. The code I've written was made to
execute within the TWS program (it's like a benevolent Trojan Horse,)
so we would need a way for it to communicate the dialog text to the
"commanding" program. It should be easy enough to put this together,
but I'm probably not going to add that functionality to my sample.

The technique I've presented has a lot of promise for certain tasks.
For instance, to address an issue recently raised, you could write
some code to pop up a market depth dialog and scrape the values from
it. You could probably do this with a VB program, but given the way
Swing works, it's not guaranteed that you can.

--- In twsapi@y..., "kevin6502" <kevin6502@y...> wrote:
I wonder if this can be modified to find "any" TWS dialog that pops
up, send the "ok", then return the message in the dialog?

--- In twsapi@y..., "alik996" <alik996@y...> wrote:
So, I just uploaded a file called AutoLoginWrapper.java. It is
the
source for a tiny program that registers code to look for the
Login
window opening, starts TWS, finds the Login button, and "presses"
it.
All of this inside the Java VM that is running TWS.


Re: automated login

 

The practical way with Java is not to update jts.jar but to change
your command line. Given a compiled copy of AutoLoginWrapper, you
just drop that in your TWS folder and then (assuming Windows) change
your shortcut from

C:&#92;j2sdk1.4.0&#92;jre&#92;bin&#92;javaw.exe -jar C:&#92;Jts&#92;jts.jar C:&#92;Jts

to

C:&#92;j2sdk1.4.0&#92;jre&#92;bin&#92;javaw.exe -classpath C:&#92;Jts&#92;jts.jar:.
AutoLoginWrapper C:&#92;Jts

A VB solution is not at all convenient for people like me. I plan to
do all of my serious automation on a *nix machine.

--- In twsapi@y..., "alik996" <alik996@y...> wrote:
Well, there are two practical solutions.
First is to update jts.jar and recompile it (Which is not very
convinient). Second to handle it manualy via VB.
...
--- In twsapi@y..., "kgeis" <kgeis@y...> wrote:
So, I just uploaded a file called AutoLoginWrapper.java. It is the
source for a tiny program that registers code to look for the Login
window opening, starts TWS, finds the Login button, and "presses"
it.


TWS API Excel sample sheet

 

I downloaded the TWS API files from IB site a couple of days ago and
took a look at the Excel DDE sample sheet. I followed the scant
instructions and gave it a go, in "demo" mode. I couldn't place a
trade from the spreadsheet, but I managed to modify a trade that I
placed in the TWS manually using the spreadsheet! I could check on
the trade and cancel it also, but I could not place a trade!

I'm sure this issue has already been discussed among some of you. If
anyone could point me to a good resource on the subject it would be
greatly appreciated.

many thanks in advance
-fm


Re: twsapi: New Project Uploaded for VB6: AutoConnect

Richard Foulk
 

}
} I just uploaded a new VB6 project for automatically closing the
} dialog box that the TWS creates when you request data via ActiveX.
} You can download the files at the following location. Source code is
} included in the zip file.
}
}
}

Thanks for the contribution.

For those that aren't aware, this is a tool that circumvents some minor
security measures within TWS. It's not hard to reinforce security
elsewhere to make up for this, but it's good to know.

The security of your system is ultimately up to you.


Richard


New Project Uploaded for VB6: AutoConnect

tripack44
 

I just uploaded a new VB6 project for automatically closing the
dialog box that the TWS creates when you request data via ActiveX.
You can download the files at the following location. Source code is
included in the zip file.


Re: automated login

kevin6502
 

I wonder if this can be modified to find "any" TWS dialog that pops
up, send the "ok", then return the message in the dialog?


--- In twsapi@y..., "alik996" <alik996@y...> wrote:
Well, there are two practical solutions.
First is to update jts.jar and recompile it (Which is not very
convinient). Second to handle it manualy via VB.

I already wrote a simple app, which handles login screen and
automatic acceptance of incoming connections.

If somebody need a tip, just let me know.

--- In twsapi@y..., "kgeis" <kgeis@y...> wrote:
--- In twsapi@y..., "Michel" <migurull@t...> wrote:
Hi,

Does somebody know some way to run the TWS application
unattended?
What I need is:
1- Avoid the login screen, passing parameters (UserName and
Password) from
my calling application.
I think that handling UI automation inside the application is
superior
to anything you could do with VB or WinTask.

So, I just uploaded a file called AutoLoginWrapper.java. It is
the
source for a tiny program that registers code to look for the
Login
window opening, starts TWS, finds the Login button, and "presses"
it.
All of this inside the Java VM that is running TWS.

Eventually, I will get around to making it automatically accept
incoming connections as well. I'll also post a binary version and
some instructions on how to use it for those who can't figure it
out.


Re: Demo system trading hours...

cyberbri_2000
 

Now it's working. Perhaps it takes a couple hours to end one cycle
and start again, I don't know.

What hours can orders be filled with the demo user?


Demo system trading hours...

cyberbri_2000
 

What hours can orders be filled with the demo user? It was OK this
morning but now it says orders can't be placed outside market hours.
I was hoping the demo would loop friday's info over the weekend, but
I guess not.

Brian


Repost : Excel interface with VB project

goldensilvermana
 

Scott

What type of Excel interface do you envision with your
existing project? I am working with excel (DDE) and VBA. I thought I
could get your ideas on this before I get to far along and perhaps
integrate any ideas into my design if they are compatible. I guess
one key would be to utilized the inherent capabilities of excel to
crunch numbers etc. thus saving lot of programming. Anyhow another
rabbit trail, but with enough trails perhaps they may all connect.

Thanks Kent


(No subject)

goldensilvermana
 

Scott

What type of Excel interface do you envision with your
existing project? I am working with excel (DDE) and VBA. I thought I
could get your ideas on this before I get to far along and perhaps
integrate any ideas into my design if they are compatible. I guess
one key would be to utilized the inherent capabilities of excel to
crunch numbers etc. thus saving lot of programming. Anyhow another
rabbit trail, but with enough trails perhaps they may all connect.

Thanks Kent


Great Job Moderating

Techguy
 

Good job Scott - you did the right thing - thanks for
saving us the pain of dealing with those issues.

Techguy

After I examined his software, and uninstalled it,
it attempted to
remove the TWS OCX from my system.

The second version that was released in less then 24
hours, had been
reduced to 4.5 MB...and "he" had unlocked the
symbols restriction.

"He" uploaded it this time to our members files
area, and once again
I downloaded an examined it. The installation
process again attempted
to overwrite key ocx files. Once installed I ran the
executable and
got a "subscript out of range error".

3 other members had immediatley posted errors as
well, though not all
the same error.

I have no problem with members, who LIKE TODD made
an announcement
and has well documented explanation pages that are
very clear as to
what a program does. They are welcome to plug their
product once and
then from time to time...they can plug again. They
can post links in
the Third Party Bookmarks folder.


183751/

What I do have a problem with is are super-hyped,
large bloated,
disfunctional applications, rushed to release,
absent of
documentation as to method or use. I will refuse to
allow our board
to turn into a product support board for for a
product that needs
more than support...AND I have ZERO tollerance for a
member that has
convienetley turned off mail receipts there by
FORCING us to
communicate hime via the board....lastley, I find it
astounding that
a developer would offer a black box to other
developers, and that
They would be interested....after all...don't we
program because we
want more control over our trades, not less?

I told Mr TraderGuard in a private email, that his
posts would be
moderated for only one week (one stinking week), and
that he should
restrict his discussion to aspects of this board, or
aspects related
to the use and implamentation the TWS API....

He hasn't been heard from since.

Their...I came clean....that is the first time I
have actually
moderated anything...hopefully its the last...I feel
so much better
now....

Scott
Owner
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free


Re: twsapi: The Ultimate GUI Features list and Screen Shot post up.

Techguy
 

Way cool Tripack- thank you.


--- tripack44 <no_reply@...> wrote:
Yahoo shrinks the size of the photos when you click
on them even
though I selected "Large Size" when I originally
uploaded them. It
might be an IE formatting issue FAIK. The only way
I've found to see
the full photo size is to use the slide show once
you are inside the
right folder under Photos.



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free