Search the web
Sign In
New User? Sign Up
amibroker-afl · AmiBroker Formula Language
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 380 - 409 of 409   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#409 From: Herman <psytek@...>
Date: Sat Feb 21, 2009 10:25 pm
Subject: Re: Re: Plotting TWS Real Time Trades.doc
psytek2
Offline Offline
Send Email Send Email
 

Nice going murthy! I think this is a very useful program for real time traders. 


btw, if you want your code automatically line-numbered and formatted, same way as prettify does it, you can place it between these two AFL markers:


[AFL

.... your code here

[/AFL]


Thank you for your contribution to the UKB,

herman



Saturday, February 21, 2009, 5:12:05 PM, you wrote:


> atually i posted it as my first post to ukb today. pl let me know if

> there is any more info that is needed




> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#408 From: "murthysuresh" <junkone1@...>
Date: Sat Feb 21, 2009 10:12 pm
Subject: Re: Plotting TWS Real Time Trades.doc
murthysuresh
Online Now Online Now
Send Email Send Email
 
atually i posted it as my first post to ukb today. pl let me know if
there is any more info that is needed

#407 From: Herman <psytek@...>
Date: Sat Feb 21, 2009 11:39 am
Subject: Re: Re: Plotting TWS Real Time Trades.doc
psytek2
Offline Offline
Send Email Send Email
 

Thanks murthy, perhaps delete the old one dated Feb 17, 2009?


btw, would you like "PlotTrades" posted on the UKB? However, it would require some descriptions and charts.


best regards,

herman

Saturday, February 21, 2009, 5:48:19 AM, you wrote:


> i fixed up the code and uploaded it. i had a bug in the daily mode

> where it was not setting the prices correctly. it was due to an

> optimization effort that i did last week before uploading it but i had

> not tested it properly. 

> it works now.




> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#406 From: "murthysuresh" <junkone1@...>
Date: Sat Feb 21, 2009 10:48 am
Subject: Re: Plotting TWS Real Time Trades.doc
murthysuresh
Online Now Online Now
Send Email Send Email
 
i fixed up the code and uploaded it. i had a bug in the daily mode
where it was not setting the prices correctly. it was due to an
optimization effort that i did last week before uploading it but i had
not tested it properly.
it works now.

#405 From: Herman <psytek@...>
Date: Fri Feb 20, 2009 11:15 pm
Subject: Re: Re: New file uploaded to amibroker-afl
psytek2
Offline Offline
Send Email Send Email
 

Thank you Murthy,


I posted the functions at http://www.amibroker.org/userkb/2009/02/20/date-and-time-to-number-conversions/


best regards,

herman



Friday, February 20, 2009, 2:28:59 PM, you wrote:


> done. infact. this can goto ukb if it is not there as it is self

> explanatory

> --- In amibroker-afl@yahoogroups.com, dhiraj khatri <miheer123@...> wrote:


>> pl upload  DateTimeToNumber.afl


>> file




>> FRom:-dhiraj



>> On 18 Feb 2009 15:42:57 -0000, amibroker-afl@yahoogroups.com <

>> amibroker-afl@yahoogroups.com> wrote:

>> >

>> >

>> > Hello,

>> >

>> > This email message is a notification to let you know that

>> > a file has been uploaded to the Files area of the amibroker-afl

>> > group.

>> >

>> > File : /PlotTrades.afl

>> > Uploaded by : murthysuresh <junkone1@... <junkone1%40gmail.com>>

>> > Description : plotting trades

>> >

>> > You can access this file at the URL:

>> > http://groups.yahoo.com/group/amibroker-afl/files/PlotTrades.afl

>> >

>> > To learn more about file sharing for your group, please visit:

>> >

>> >

> http://help.yahoo.com/l/us/yahoo/groups/original/members/web/index.htmlfiles

>> >

>> > Regards,

>> >

>> > murthysuresh <junkone1@... <junkone1%40gmail.com>>

>> >

>> >

>> > 

>> >






> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#404 From: "murthysuresh" <junkone1@...>
Date: Fri Feb 20, 2009 7:28 pm
Subject: Re: New file uploaded to amibroker-afl
murthysuresh
Online Now Online Now
Send Email Send Email
 
done. infact. this can goto ukb if it is not there as it is self
explanatory
--- In amibroker-afl@yahoogroups.com, dhiraj khatri <miheer123@...> wrote:
>
> pl upload  DateTimeToNumber.afl
>
> file
>
>
>
> FRom:-dhiraj
>
>
> On 18 Feb 2009 15:42:57 -0000, amibroker-afl@yahoogroups.com <
> amibroker-afl@yahoogroups.com> wrote:
> >
> >
> > Hello,
> >
> > This email message is a notification to let you know that
> > a file has been uploaded to the Files area of the amibroker-afl
> > group.
> >
> > File : /PlotTrades.afl
> > Uploaded by : murthysuresh <junkone1@... <junkone1%40gmail.com>>
> > Description : plotting trades
> >
> > You can access this file at the URL:
> > http://groups.yahoo.com/group/amibroker-afl/files/PlotTrades.afl
> >
> > To learn more about file sharing for your group, please visit:
> >
> >
http://help.yahoo.com/l/us/yahoo/groups/original/members/web/index.htmlfiles
> >
> > Regards,
> >
> > murthysuresh <junkone1@... <junkone1%40gmail.com>>
> >
> >
> >
> >
>

#403 From: amibroker-afl@yahoogroups.com
Date: Fri Feb 20, 2009 7:24 pm
Subject: New file uploaded to amibroker-afl
amibroker-afl@yahoogroups.com
Send Email Send Email
 
Hello,

This email message is a notification to let you know that
a file has been uploaded to the Files area of the amibroker-afl
group.

   File        : /DateTimeToNumber.afl
   Uploaded by : murthysuresh <junkone1@...>
   Description : datetime to number and reverse

You can access this file at the URL:
http://groups.yahoo.com/group/amibroker-afl/files/DateTimeToNumber.afl

To learn more about file sharing for your group, please visit:
http://help.yahoo.com/l/us/yahoo/groups/original/members/web/index.htmlfiles

Regards,

murthysuresh <junkone1@...>

#402 From: dhiraj khatri <miheer123@...>
Date: Thu Feb 19, 2009 6:31 am
Subject: Re: New file uploaded to amibroker-afl
ashapura_elec
Offline Offline
Send Email Send Email
 
pl upload  DateTimeToNumber.afl
 
file
 
 
 
FRom:-dhiraj

 
On 18 Feb 2009 15:42:57 -0000, amibroker-afl@yahoogroups.com <amibroker-afl@yahoogroups.com> wrote:


Hello,

This email message is a notification to let you know that
a file has been uploaded to the Files area of the amibroker-afl
group.

File : /PlotTrades.afl
Uploaded by : murthysuresh <junkone1@...>
Description : plotting trades

You can access this file at the URL:
http://groups.yahoo.com/group/amibroker-afl/files/PlotTrades.afl

To learn more about file sharing for your group, please visit:
http://help.yahoo.com/l/us/yahoo/groups/original/members/web/index.htmlfiles

Regards,

murthysuresh <junkone1@...>




#401 From: Thomas Ludwig <Thomas.Ludwig@...>
Date: Sun Feb 15, 2009 11:13 am
Subject: Re: AFL Projects for the UKB
tlu1024
Offline Offline
Send Email Send Email
 
Herman,

your commitment is highly appreciated - your contributions to the AB
community over the years are really enormous!  I'm certainly willing to
participate in the AFL projects, but I'm not sure if my limited coding
skills are sufficient.

Having said that, I'm interested in
Accelerating Indicators.doc
and
Closing a Position.doc

I hope that I will be able to achieve some useful results.

Greetings,

Thomas


> Please answer to this email on AmiBroker-afl. As I unannounced on the
> main list I have an assortment of ideas and code (nothing fancy!)
> that some users may find useful and may want to work on. As time
> permits I will share what I have, answer questions, and help with
> coding. This may help newcomers pick up afl programming techniques
> and speed up their personal projects. We will use AmiBroker-AFL to
> work on the posts. This effort is most useful to beginners however
> anyone can comment or participate.
>
> 1) The object is to produce documented code that can be posted on
> the User's Knowledge Base . Visit the UKB for examples. Topics can be
> tips, tricks, and afl code of any complexity. Neither presentation or
> code is expected to be perfect. The idea is to provide starter-afl
> and ideas that can be used by others in whatever application they are
> working on.
>
> 2) To allow tracking projects it is ESSENTIAL that the subject line
> of posts is descriptive and remains unchanged.
>
> 3) Below are some topics from my UKB folder. Completion varies from
> heading-only to some fairly complete work. A few topics may already
> be in the library or on the UKB, in which case it may be possible to
> improve on existing code - or we simply skip it. It would take me too
> much time to add descriptions, so, if a a topic sounds interesting
> tell me what you expect it to be (we might get some new ideas that
> way) and we can discuss it. 
>
> Also feel free to add your own ideas/requirements: new topics
> welcome!
>
> Best regards,
> herman
>
> Accelerating Indicators.doc
> Applying TimeZones to the TWS Tradelist.doc
> Automated Chart Reviews.doc
> Automated Composite Generation.doc
> Bar Overlap in Real-time.doc
> Button Slider.doc
> Button to Set Numerical Parameters.doc
> Canceling Orders on the IBc PendingList.doc
> Chart Bookmarks.doc
> Chart Trading.doc
> Closing a Position.doc
> Collecting TWS Error Messages.doc
> Converting the TWSTrades file to csv.doc
> Creating Custom Titles.doc
> Creating execution timing alerts.doc
> Creating GTD and GAT Time strings.doc
> Creating InLine RealTimeComposites.doc
> Creating the Breakout Range Indicator.doc
> Data Cleansing.doc
> Data Latency - Ping.doc
> DBV RT.doc
> Debugging Loops.doc
> Debugging with Say.doc
> Deleting Composites.doc
> Designing a system using a loop.doc
> Detecting Parameter Change.doc
> Developing Entries using n-bar exits.doc
> Developing exits using Random entries.doc
> Developing Low Level GFX overlays.doc
> Display Last n Actions on your chart.doc
> Displaying Accounts Fields.doc
> Displaying Pane Execution Times.doc
> Displaying Portfolio Status.doc
> Displaying TWS Connection Status.doc
> Elastic Time.doc
> ErrorCodeExtraction.doc
> Exploring Bar Overlap.doc
> Exploring Intra Ticker Relationships.doc
> Feeding TWS Exported Tradelists into the Backtester.doc
> Finding coding errors.doc
> Flipping Signals.doc
> Forward DeGapping.doc
> GFX Custom Cursors.doc
> Gfx for dummies.doc
> GFX Popup Window.doc
> Gfx Title for Real.doc
> Global Parameters.doc
> Global Variables.doc
> HFAT eSignal.doc
> Intraday market behavior.doc
> LastBar Centering.doc
> Linear Regression based HHV.doc
> Linear Regression Channels.doc
> Looping.doc
> Maintaining a TWS Error.doc
> mark cursor across windows.doc
> Misc Debugging Tricks.doc
> OHL RT price bars.doc
> Optimizing Code for speed.doc
> Optimizing Dependent and Independent parameters.doc
> Optimizing in Real Time from an Indicator.doc
> ParamDateSlider.doc
> Parameter Signatures.doc
> ParamFile.doc
> PassCounters.doc
> Pattern Recognition.doc
> PersistentArrays.doc
> Placing an Order through the IB.doc
> Plot time remaining at last bar.doc
> Plotting a Breakout Range.doc
> Plotting Profit bars.doc
> Plotting TWS Real Time Trades.doc
> PlotTWSTrades.doc
> Price Prediction.doc
> Profit Targets.doc
> Putting the T3 in Overdrive.doc
> Relative Strength and Correlation.doc
> Replacing Bars with TickAveraged Data.doc
> Signal Averaging.doc
> Slideshow.doc
> Streak Analysis.doc
> Sync Window Data ranges.doc
> Synchronizing Global Parameters.doc
> Synthesized Voice Reporting.doc
> The Price Path.doc
> Custom Tick Chart.doc
> TWS Error and Order Status handling.doc
> TWS Error Message Parsing.doc
> Typical Indicator Development.doc
> UKB Demo AT exerciser.doc
> Using an Action Queue.doc
> Using IntraBar Arrays.doc
> Using Composites for Storage.doc
> Using Include files to store data.doc
> Using Inline Realtime composites.doc
> Using System States.doc
> Using the Auto Exported TWS Tradelist.doc
> Which comes first H or L.doc
>
>
>
>
>
>
>
>
>

#400 From: Herman <psytek@...>
Date: Thu Feb 19, 2009 8:52 pm
Subject: Re: Re: Plotting TWS Real Time Trades.doc
psytek2
Offline Offline
Send Email Send Email
 

Thank you again,


Except for the multiple entries... pyramiding? it all seems clear.


I applied the formula and it works nice!!! 


Thank you very much posting it.


A few ideas on what I might add: 


Trade-Lines

stepping across trades


all I need is more time!


Great work murthysuresh

thank you again!


herman



Thursday, February 19, 2009, 2:54:54 PM, you wrote:


> basically you need a input file that would create static variables in

> following format.


> // defines if it is a stock or forex. 

> StaticVarSetText( "TradeType" , "Stocks" );  //Stocks|Forex

> // defines the forex symbol

> StaticVarSetText( "forexSymbol" , "SBUX" ); //"EUR.USD-IDEALPRO-CASH|

> // defines the stock symbol

> StaticVarSetText( "StockSymbol", "SBUX" ); //  "YHOO"

> // long or short trade. 

> StaticVarSetText( "ShortOrLong" , "Long" );  //"Short|Long"

> // entry prices

> StaticVarSetText( "EntryPrice" , "14.5,15.5" );

> // exit prices

> StaticVarSetText( "ExitPrice" , "14.3" );

> // entry date in date number comma delimited

> StaticVarSetText( "EntryDate" , "1080717,1080723" );

> // exit date in date number. comma delimited

> StaticVarSetText( "ExitDate", "1080725" );

> // entry time in time number comma delimited

> StaticVarSetText( "EntryTime", "142500,120000" );

> // exit time in time number comma delimited

> StaticVarSetText( "ExitTime" , "110500" );

> // trade id. its an internal key for me

> StaticVarSetText( "Tradeid" , "4" );

> // trade strategy. 

> StaticVarSetText( "TradeStrategy" , "fsdfdsfds" );

> // any comments on trade

> StaticVarSetText( "TradeComments" , "this is the comment" );

> // sets no of entries so that the code loops when printing the number

> of trdes.

> if 1, then ther should be only 1 entry date/time

if >>1, it should match no of entry date/time



> StaticVarSet( "NoOfEntries" , 2 );

> same as above.

> StaticVarSet( "NoOfExits" , 1 );





> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#399 From: "murthysuresh" <junkone1@...>
Date: Thu Feb 19, 2009 7:54 pm
Subject: Re: Plotting TWS Real Time Trades.doc
murthysuresh
Online Now Online Now
Send Email Send Email
 
basically you need a input file that would create static variables in
following format.

// defines if it is a stock or forex.
StaticVarSetText( "TradeType" , "Stocks" );  //Stocks|Forex
// defines the forex symbol
StaticVarSetText( "forexSymbol" , "SBUX" ); //"EUR.USD-IDEALPRO-CASH|
// defines the stock symbol
StaticVarSetText( "StockSymbol", "SBUX" ); //  "YHOO"
// long or short trade.
StaticVarSetText( "ShortOrLong" , "Long" );  //"Short|Long"
// entry prices
StaticVarSetText( "EntryPrice" , "14.5,15.5" );
// exit prices
StaticVarSetText( "ExitPrice" , "14.3" );
// entry date in date number comma delimited
StaticVarSetText( "EntryDate" , "1080717,1080723" );
// exit date in date number. comma delimited
StaticVarSetText( "ExitDate", "1080725" );
// entry time in time number comma delimited
StaticVarSetText( "EntryTime", "142500,120000" );
// exit time in time number comma delimited
StaticVarSetText( "ExitTime" , "110500" );
// trade id. its an internal key for me
StaticVarSetText( "Tradeid" , "4" );
// trade strategy.
StaticVarSetText( "TradeStrategy" , "fsdfdsfds" );
// any comments on trade
StaticVarSetText( "TradeComments" , "this is the comment" );
// sets no of entries so that the code loops when printing the number
of trdes.
if 1, then ther should be only 1 entry date/time
if >1, it should match no of entry date/time


StaticVarSet( "NoOfEntries" , 2 );
same as above.
StaticVarSet( "NoOfExits" , 1 );

#398 From: Herman <psytek@...>
Date: Wed Feb 18, 2009 9:31 pm
Subject: Re: Re: Plotting TWS Real Time Trades.doc
psytek2
Offline Offline
Send Email Send Email
 

I have been out most of the day and haven't looked at your code yet.


Perhaps you can explain what is needed in addition to the code to make it work. 


I assume it requires an input file. What format is required? I have programs that read the trade execution file and can make it produce any format required.


Is that all there is to add? 


herman



Wednesday, February 18, 2009, 2:22:00 PM, you wrote:


> shoot any questions and i would be eager to answer. the reason, i did

> not post the entire app was becoz, there is too much technology

> involved as it evolved.

> the importing of data is done using C# along with open source api from

> http://www.dinosaurtech.com/


> The processing of data is done using ruby and heavy usage of active

> records.


> so. i had wanted to share it however, i kept procrastinating it as i

> do not have sufficient documentation for it and was just adding

> functionality to it. 


> it works as i use it daily.

> but for the benefit of this group, the afl used would work as long as

> it can be fed the input data to plot the trades. 





> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#397 From: "murthysuresh" <junkone1@...>
Date: Wed Feb 18, 2009 7:22 pm
Subject: Re: Plotting TWS Real Time Trades.doc
murthysuresh
Online Now Online Now
Send Email Send Email
 
shoot any questions and i would be eager to answer. the reason, i did
not post the entire app was becoz, there is too much technology
involved as it evolved.
the importing of data is done using C# along with open source api from
http://www.dinosaurtech.com/

The processing of data is done using ruby and heavy usage of active
records.

so. i had wanted to share it however, i kept procrastinating it as i
do not have sufficient documentation for it and was just adding
functionality to it.

it works as i use it daily.
but for the benefit of this group, the afl used would work as long as
it can be fed the input data to plot the trades.

#396 From: Herman <psytek@...>
Date: Wed Feb 18, 2009 4:09 pm
Subject: Re: Re: Plotting TWS Real Time Trades.doc
psytek2
Offline Offline
Send Email Send Email
 

Thank you murthysuresh,


it sounds like a good idea to save trades in a DB, better then maintaining a lot of files on the BD.


I looked at the file but it is too complex to get a quick idea of how it works, i plan to test it soon and will let you know how it works out.


Thanks again for sharing!


herman

Wednesday, February 18, 2009, 10:48:05 AM, you wrote:


> i basically import my trades from tws into a mysql database. i have a

> concept of following

> 1. entry signal. which determines the entry

> 2. exit signal. which determines the exit

> 3. trade strategy. each has its associated entry and exit signals.


> infact, i have a large application that manages my trades and

> plotting the trades on amibroker is my methodology of reviewing it

> weekly.

> when i import the trade, i derive the datenumber and time numbe so

> that afl does not have to do the magic.

> the code that i uploaded, has the imput entries into the afl

> commented out.

> i basically have a script that will write out the input in following

> format into the commentary window

> StaticVarSetText( "TradeType" , "Stocks" );  //Stocks|Forex

> StaticVarSetText( "forexSymbol" , "SBUX" ); //"EUR.USD-IDEALPRO-CASH|

> StaticVarSetText( "StockSymbol", "SBUX" ); //  "YHOO"

> StaticVarSetText( "ShortOrLong" , "Long" );  //"Short|Long"

> StaticVarSetText( "EntryPrice" , "14.5,15.5" );

> StaticVarSetText( "ExitPrice" , "14.3" );

> StaticVarSetText( "EntryDate" , "1080717,1080723" );

> StaticVarSetText( "ExitDate", "1080725" );

> StaticVarSetText( "EntryTime", "142500,120000" );

> StaticVarSetText( "ExitTime" , "110500" );

> StaticVarSetText( "Tradeid" , "4" );

> StaticVarSetText( "TradeStrategy" , "fsdfdsfds" );

> StaticVarSetText( "TradeComments" , "this is the comment" );


> i set the tradetype because i have different databses for forex and

> stocks.




> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#395 From: "murthysuresh" <junkone1@...>
Date: Wed Feb 18, 2009 3:48 pm
Subject: Re: Plotting TWS Real Time Trades.doc
murthysuresh
Online Now Online Now
Send Email Send Email
 
i basically import my trades from tws into a mysql database. i have a
concept of following
1. entry signal. which determines the entry
2. exit signal. which determines the exit
3. trade strategy. each has its associated entry and exit signals.

infact, i have a large application that manages my trades and
plotting the trades on amibroker is my methodology of reviewing it
weekly.
when i import the trade, i derive the datenumber and time numbe so
that afl does not have to do the magic.
the code that i uploaded, has the imput entries into the afl
commented out.
i basically have a script that will write out the input in following
format into the commentary window
StaticVarSetText( "TradeType" , "Stocks" );  //Stocks|Forex
StaticVarSetText( "forexSymbol" , "SBUX" ); //"EUR.USD-IDEALPRO-CASH|
StaticVarSetText( "StockSymbol", "SBUX" ); //  "YHOO"
StaticVarSetText( "ShortOrLong" , "Long" );  //"Short|Long"
StaticVarSetText( "EntryPrice" , "14.5,15.5" );
StaticVarSetText( "ExitPrice" , "14.3" );
StaticVarSetText( "EntryDate" , "1080717,1080723" );
StaticVarSetText( "ExitDate", "1080725" );
StaticVarSetText( "EntryTime", "142500,120000" );
StaticVarSetText( "ExitTime" , "110500" );
StaticVarSetText( "Tradeid" , "4" );
StaticVarSetText( "TradeStrategy" , "fsdfdsfds" );
StaticVarSetText( "TradeComments" , "this is the comment" );

i set the tradetype because i have different databses for forex and
stocks.

#394 From: amibroker-afl@yahoogroups.com
Date: Wed Feb 18, 2009 3:42 pm
Subject: New file uploaded to amibroker-afl
amibroker-afl@yahoogroups.com
Send Email Send Email
 
Hello,

This email message is a notification to let you know that
a file has been uploaded to the Files area of the amibroker-afl
group.

   File        : /PlotTrades.afl
   Uploaded by : murthysuresh <junkone1@...>
   Description : plotting trades

You can access this file at the URL:
http://groups.yahoo.com/group/amibroker-afl/files/PlotTrades.afl

To learn more about file sharing for your group, please visit:
http://help.yahoo.com/l/us/yahoo/groups/original/members/web/index.htmlfiles

Regards,

murthysuresh <junkone1@...>

#393 From: Herman <psytek@...>
Date: Tue Feb 17, 2009 8:48 pm
Subject: Re: Re: Plotting TWS Real Time Trades.doc
psytek2
Offline Offline
Send Email Send Email
 

hello murthysuresh,


perhaps you want to share your method, it may be better! 


What type of database do you use?


best regards,

herman



Tuesday, February 17, 2009, 11:14:17 AM, you wrote:


> when i was reading thro the code, i reaslised that i had moved my

> imlementation a lot away from this original code.

> i import all my tws trades into a database and plot it on a chart for

> reviewing. nonethe less, i will start digging it and upload the changes

> into the files section.





> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#392 From: "murthysuresh" <junkone1@...>
Date: Tue Feb 17, 2009 4:14 pm
Subject: Re: Plotting TWS Real Time Trades.doc
murthysuresh
Online Now Online Now
Send Email Send Email
 
when i was reading thro the code, i reaslised that i had moved my
imlementation a lot away from this original code.
i import all my tws trades into a database and plot it on a chart for
reviewing. nonethe less, i will start digging it and upload the changes
into the files section.

#391 From: Herman <psytek@...>
Date: Sat Feb 14, 2009 9:14 pm
Subject: Re: Which comes first H or L
psytek2
Offline Offline
Send Email Send Email
 

29. Which comes first H or L.doc


Especially in EOD code it helps to know which comes first, the high or the Low. this can never be known for sure however there are way to predict, or establish the probability for one to come before the other. Knowing that the high is likely to come first may enable you to take advantage of this in your system design - without having to subscribe to Intraday data. This would be mostly a research topic.


Best regards,

herman



Thursday, February 12, 2009, 2:14:11 AM, you wrote:


> Hi,


> browsing Herman's list, this is a relevant issue (at least for me)

> when designing trading systems, even when using intraday data (eg 5

> min data):


> 29. Which comes first H or L.doc


> Any ideas, comments or suggestions would be appreciable.


> Greetings,


> Angelo.





> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#390 From: Herman <psytek@...>
Date: Sat Feb 14, 2009 9:11 pm
Subject: Re: Re: AFL Projects for the UKB
psytek2
Offline Offline
Send Email Send Email
 

> [ OHL RT price bars.doc 


This is a simple topic and deals with the fact that when using Intraday bar the Previous Close and the current open are two consecutive ticks with minimum price change between them. If you were to take the bar average (O+H+L+C)/4 this would be weighted towards the Open of the bar. Hence in Intraday I would use OHL only. Others may use different methods. This in contrast to End of Day bars where there can be a significant price change over night.


> Optimizing Code for speed.doc 


Optimizing code for speed would explain some methods which can be used, and/or should be prevented, when designing code for execution speed. This would be mostly for real-time applications.


> Optimizing Dependent and Independent parameters.doc 


Exhaustive optimizations often take a long time to complete however there are many situations where a variable can be optimized separately. These would be variables that optimize to the same value independently from the values optimized to by other variables. This topic would explore how depencies can be determined, and how indpendent optimization can be coded into optimizations.


> Optimizing in Real Time from an Indicator.doc ]


Optimizing in real-time from an indicator would explain how you perform simple optimizations "in-line". This, for example, would come in handy when trading a portfolio and each ticker needs to use a different stop level. 


All of the above are just ideas and need to be developed virtually from scratch. 


best regards,

herman







Monday, February 9, 2009, 3:00:24 PM, you wrote:


> dear sir,

> Thank you for making this group alive once again..sir iam eager to 

> read-learn from .doc

> [ OHL RT price bars.doc 

> Optimizing Code for speed.doc 

> Optimizing Dependent and Independent parameters.doc 

> Optimizing in Real Time from an Indicator.doc ]

> as you have mentioned please guide me from where i ll be able to 

> download those docs , i have searched userkb..etc..etc ,but didnt find

> those..

> kindly help,

> Thank you




> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#389 From: Herman <psytek@...>
Date: Sat Feb 14, 2009 8:56 pm
Subject: Re: Re: AFL Projects for the UKB
psytek2
Offline Offline
Send Email Send Email
 

Hello,


Many of these .doc file are INCOMPLETE topics, while some others are in an advanced stage (see the post on Plotting TWS Trades). They topics were listed (not posted anywhere) to allow users, it they are interested, to work on them. I am personally willing, within my capability (I am NOT a professional programmer), to help with the coding, in public on this list. Users will have to do most of the work; I am just a facilitator. This is where some people may benefit from projects and learn something new. When a project is complete with a description on what the code does and how it works, the intend is to publish it on the UKB.


I will give you a brief introduction to the topics you mentioned in a later email.


best regards,

herman





Monday, February 9, 2009, 3:00:24 PM, you wrote:


> dear sir,

> Thank you for making this group alive once again..sir iam eager to 

> read-learn from .doc

> [ OHL RT price bars.doc 

> Optimizing Code for speed.doc 

> Optimizing Dependent and Independent parameters.doc 

> Optimizing in Real Time from an Indicator.doc ]

> as you have mentioned please guide me from where i ll be able to 

> download those docs , i have searched userkb..etc..etc ,but didnt find

> those..

> kindly help,

> Thank you




> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#388 From: "Angelo" <ima_cons@...>
Date: Thu Feb 12, 2009 7:14 am
Subject: Which comes first H or L
ima_cons
Offline Offline
Send Email Send Email
 
Hi,

browsing Herman's list, this is a relevant issue (at least for me)
when designing trading systems, even when using intraday data (eg 5
min data):

29. Which comes first H or L.doc

Any ideas, comments or suggestions would be appreciable.

Greetings,

Angelo.

#387 From: "chandrakant" <darshan_age@...>
Date: Mon Feb 9, 2009 8:00 pm
Subject: Re: AFL Projects for the UKB
darshan_age
Offline Offline
Send Email Send Email
 
dear sir,
Thank you for making this group alive once again..sir iam eager to
read-learn from .doc
[ OHL RT price bars.doc
Optimizing Code for speed.doc
Optimizing Dependent and Independent parameters.doc
Optimizing in Real Time from an Indicator.doc ]
as you have mentioned please guide me from where i ll be able to
download those docs , i have searched userkb..etc..etc ,but didnt find
those..
kindly help,
Thank you

#386 From: "marketmonk777" <RedEyes777@...>
Date: Sat Feb 14, 2009 4:30 pm
Subject: Moderator
marketmonk777
Offline Offline
Send Email Send Email
 
To moderator,

I would be honored to assist with moderating this group, helping to
keep spam out, clean out the files, etc.   There is a growing interest
in using this group once again and I would hate to see folks get
discouraged.

Regards,
MM

#385 From: Herman <psytek@...>
Date: Mon Feb 9, 2009 6:40 pm
Subject: Re[2]: Plotting TWS Real Time Trades.doc
psytek2
Offline Offline
Send Email Send Email
 

hello murthysuresh,


Code is attached and listed below the capture for those who do not receive attachments. This is how far I got with this program. I tested it and it works. Be sure to set the time offset... you may just have to vary it to make sure it is set correctly. You can see the offset from the trade listing in the title. It would be best for you to play with it and see how it can be turned in an easy to use function or #Include.


Others readers are invited to suggest options that they think are useful.


Have fun,

herman


Copy the code below to an indicator and Apply. Open the param window.

Select the simulated.trades TWS exported filename

Set your local time offset wrt GMT

Click to Show trade sizes and Info

Open your TWS simulated account and make a few trades.

Wait about a minute for TWS to update the exported file (open your explorer to see it is there)

Click the REFRESH Param to read the file.

You should now have a display as shown below. A green Dot where you executed a Buy and a Red dot where you executed a Sell.

Turn on Tooltip and you can see the trade parameters, including the real fill price!

T/B Show the number of trades per bar (they may fall withing the same minute bar).

 



// PlotTWSTrades.afl


Filename = StrLeft(_DEFAULT_NAME(),StrLen(_DEFAULT_NAME())-2);

InIndicator         = Status("Action") == 1;

StaticVarKey         = Name();

procedure         xStaticVarSet( SName, SValue )                 { if( InIndicator ) StaticVarSet(Sname+StaticVarKey, Svalue); }

function         xStaticVarGet( SName )                                         { return StaticVarGet(Sname+StaticVarKey); }

procedure         xStaticVarSetText( SName, SValue )         { if( InIndicator ) StaticVarSetText(Sname+StaticVarKey, Svalue); }

function         xStaticVarGetText( SName )                         { return StaticVarGetText(Sname+StaticVarKey); }


function TimeNumToSeconds( TN )

       {;

       Seconds         = int(TN%100);

       Minutes         = int(TN/100%100);

       Hours         = int(TN/10000%100);

       SecondNum= int(Hours*3600+Minutes*60+Seconds);

       return SecondNum;

       }


function SecondsToTimeNum( Seconds )

       {

       Hours         = int(Seconds/3600);

       Minutes        = int((Seconds - Hours*3600)/60);

       Seconds        = Seconds - Hours*3600 - Minutes*60;

       TimeNumber = 10000*Hours+100*Minutes+Seconds;

       return TimeNumber;

       }


function ReadTWSTradeList( Ticker1 )

       {

       global TWSExportFilename, GMTTimeOS;

       TimeFrame = Interval();

       InputPath = "C:\\Jts\\"+TWSExportFilename;

   //_TRACE( "Opening: "+InputPath);

       fh1 = fopen( InputPath, "r");

       if( fh1 ) 

               { 

      //_TRACE( "File Opened");

               TradesPerBar=1;

               TradeNumber=0;

                  while( ! feof( fh1 ) ) 

                   { 

                       TradeNumber++;

                       Line = StrReplace(L1=fgets( fh1 ),";",",");

         //_TRACE( "Reading Trades; "+Line);

                       if( Line == "" ) break;

                       Ticker  = StrExtract(Line,0);

                       if( StrToUpper(Ticker) == StrToUpper(Ticker1) )

                               {

                               Action          = StrExtract(Line,1);

                               Qty             = StrToNum(StrExtract(Line,2));

                               Price         = StrToNum(StrExtract(Line,3));

                               DateStr         = StrExtract(Line,5);

                               YearNum        = StrToNum(StrLeft(DateStr,4));

                               MonthNum        = StrToNum(StrMid(DateStr,4,2));

                               DayNum        = StrToNum(StrRight(DateStr,2));

                               DateNumber = (YearNum-1900)*10000+100*MonthNum+DayNum;

                               DateNumStr = NumToStr(DateNumber,1.0,False);


                               TimeStr         = StrExtract(Line,4);

                               Minutes        = StrToNum(StrMid(TimeStr,3,2));

                               Seconds        = StrToNum(StrRight(TimeStr,2));


                               Hours                = StrToNum(StrLeft(TimeStr,2));

                               Hours                = StrToNum(StrLeft(TimeStr,2))+GMTTimeOS;

                               Hours                = Max(0,Hours);                // Keep time GTE to zero Hours

                               Hours                = Min(24,Hours);                // Keep time LTE 24 Hours

                               SecondNum= 3600*Hours+60*Minutes+Seconds;

                                 TimeNumber = SecondsToTimeNum( SecondNum );


                               RoundSecondNum  = int(SecondNum/TimeFrame)*TimeFrame;

                               TimeNumber = SecondsToTimeNum( RoundSecondNum );

                               TimeNumStr = NumToStr(TimeNumber,1.0,False);


                               DateTimeString = DateNumStr+TimeNumStr;

                               StaticNameBase        = Ticker+DateTimeString;


                               PrevStaticNameBase  = StaticVarGetText("StaticNameBase");

                               if( PrevStaticNameBase == StaticNameBase ) TradesPerBar++; else TradesPerBar=1;

                               StaticVarSetText("StaticNameBase",StaticNameBase);

                               StaticVarSet(StaticNameBase,TradesPerBar);                                                // Trade marker


                               if( TradesPerbar > 1 )

                                       {

                                       TradeInfo = StaticVarGetText("Info-"+StaticNameBase);

                                       TradeInfo = TradeInfo + Line;

                                       StaticVarSetText("Info-"+StaticNameBase,TradeInfo);                // Trade info

                                       }

                               else StaticVarSetText("Info-"+StaticNameBase,Line);        


                               TradesPerbar = StaticVarGet(StaticNameBase);                                                // Verify


                               StaticName = NumToStr(TradesPerBar,1.0,False)+"-"+StaticNameBase;

                               StaticVarSet("Price"+StaticName, Price);

                               if( Action == "BOT" )                         StaticVarSet("BOT"+StaticName, Qty);

                               else if( Action == "SLD" )          StaticVarSet("SLD"+StaticName, Qty);


                               _TRACE("# "+NumToStr(TradeNumber,4.0,False)+", PeriodTrade#: "+NumToStr(TradesPerBar,1.0,False)+", "+StaticNameBase);

                               }

                       }

               }

   else _TRACE(" Cannot Open File: "+InputPath);

       }


function CreateTradeComposites( Ticker )

       {

       global PriceArray, QtyArray;

       DN=DateNum();

       TN=TimeNum();

       Ticker = StrToUpper(Ticker);

       PriceArray         = Null;

       QTYBOT         = Null;

       QTYSLD         = Null;

   TPB = Null;

       DN = DateNum();

       TN = TimeNum();

       FirstVisibleBar = Status( "FirstVisibleBar" );

       Lastvisiblebar = Status("LastVisibleBar");


       for( b = Firstvisiblebar; b <= Lastvisiblebar AND b < BarCount; b++)

               {

               DateNumStr                 = NumToStr(DN[b],1.0,False);

               TimeNumStr                 = NumToStr(TN[b],1.0,False);

               DateTimeString = DateNumStr+TimeNumStr;

               StaticName                = Ticker+DateTimeString;

               TradesPerbar         = Nz(StaticVarGet(StaticName));

               TPB[b]                         = TradesPerBar;

      _TRACE("Creating Comp, Checking, "+StaticName+", bar #: "+b+"Trades/Bar: "+TradesPerBar );

               if( TradesPerbar )

                       {

                       BaseName                 = NumToStr(TradesPerBar,1.0,False)+"-"+StaticName;

                       PriceArray[b]         = Nz(StaticVarGet("Price"+BaseName));

                       QtyBOT[b]           = Nz(StaticVarGet("BOT"+BaseName));

                       QtySLD[b]           = Nz(StaticVarGet("SLD"+BaseName));

                       _TRACE("# "+NumToStr(TradesPerbar,1.0,False)+

                               ", "+StaticName + 

                               " BOT " + NumToStr(QtyBOT[b],6.0,False) + 

                               " SLD "+NumToStr(QtySLD[b],6.0,False) + 

                               " Price $" + NumToStr(PriceArray[b],1.2));

                       }

               }

AddToComposite( PriceArray,"~" + Ticker + "-TWS", "O", atcFlagEnableInIndicator | atcFlagCompositeGroup | atcFlagDeleteValues );

AddToComposite( QtyBOT,                "~" + Ticker + "-TWS", "H", atcFlagEnableInIndicator | atcFlagCompositeGroup | atcFlagDeleteValues );

AddToComposite( QtySLD,                "~" + Ticker + "-TWS", "L", atcFlagEnableInIndicator | atcFlagCompositeGroup | atcFlagDeleteValues );

AddToComposite( TPB,                        "~" + Ticker + "-TWS", "C", atcFlagEnableInIndicator | atcFlagCompositeGroup | atcFlagDeleteValues );

}


function GetFileStatus( FilePath )

       {

       PrevFDT = Nz(StaticVarGet("ExportFileDT"));

       FDT = fgetstatus( filePath, 1, 5 );

       StaticVarSet("ExportFileDT",FDT);

       return PrevFDT != FDT;

       }


global TWSExportFilename, PriceArray, QtyArray, test, GMTTimeOS;

SetBarsRequired(sbrAll,sbrAll);

GraphXSpace = 15;

TWSExportFilename                = ParamList("TWS-Exported Tradelist","Real.Trades|Simulated.Trades|Demo.Trades",1);

ReadTradeListTrigger = ParamTrigger("Refresh TWS Trades","REFRESH");

GMTTimeOS                                = Param("GMT Time Offset",-4,-24,24,1);

ShowTradeSizes                        = ParamToggle("Trade Sizes","HIDE|SHOW",0);

ShowTradeInfo                        = ParamToggle("Trade Info","HIDE|SHOW",0);

Ticker                                         = Name();


FileChanged = GetFileStatus( "C:\\Jts\\"+TWSExportFilename );

if( ReadTradeListTrigger OR FileChanged )

       {

       _TRACE("#DBGVIEWCLEAR");

       ReadTWSTradeList( Ticker );

       CreateTradeComposites( Ticker );

       }


Price         = Foreign("~"+Ticker+"-TWS","O",False);

QtyBOT        = Foreign("~"+Ticker+"-TWS","H",False);

QtySLD         = Foreign("~"+Ticker+"-TWS","L",False);

NumTrades= Foreign("~"+Ticker+"-TWS","C",False);


TradeNum = Cum(QtyBOT>0 OR QtySLD>0);

Plot(C,"",1,128);

TCo = IIf(QtyBOT, 5,IIf(QtySLD,4,1));

PlotShapes(IIf(Price>0,shapeSmallCircle,shapeNone),TCo,0,Price,0);


if( ShowTradeSizes )

       {

       Plot(QtySLD,"",4,styleArea|styleOwnScale|styleNoLabel,0,5000);

       Plot(QtyBOT,"",5,styleArea|styleOwnScale|styleNoLabel,0,5000);

       SP=SelectedValue(Price);

       Plot(IIf(SP>0,SP,Null),"",2,1);

       }

if(ShowTradeInfo )

       {

       DN=DateNum();

       TN=TimeNum();

       DateNumStr                 = NumToStr(DN,1.0,False);

       TimeNumStr                 = NumToStr(TN,1.0,False);

       DateTimeString = DateNumStr+TimeNumStr;

       StaticName                = Ticker+DateTimeString;

       TradeInfo = StaticVarGetText("Info-"+StaticName);

       }

else TradeInfo = "";


DT=DateTime();

ToolTip=

"GMT os: "+NumToStr(GMTTimeOS,1.0)+"\n"+

"Trade#: "+NumToStr(TradeNum,1.0,False)+"\n"+

"  Time: "+DateTimeToStr(SelectedValue(DT))+"\n"+

"   T/B: "+NumToStr(NumTrades,1.0,False)+"\n"+

"   BOT: "+NumToStr(QtyBOT,1.0,False)+"\n"+

"   SLD: "+NumToStr(QtySLD,1.0,False)+"\n"+

"     $: "+NumToStr(Price,1.2);


Title = "\n"+Filename+"\n"+

"TWS Export Filename: "+"C:\\Jts\\"+TWSExportFilename+"\n"+

WriteIf(ShowTradeInfo,TradeInfo+"\n","")+

ToolTip;



#384 From: Herman <psytek@...>
Date: Mon Feb 9, 2009 4:35 pm
Subject: Re: Plotting TWS Real Time Trades.doc
psytek2
Offline Offline
Send Email Send Email
 

Great,


To start you'll probably want to include backing up the TWS execution file, there is an example here:


http://www.amibroker.org/userkb/2008/02/18/readingbacking-up-the-tws-exported-execution-report/


You may, but of course yo can do it differently, want to write a function that checks whether the exported execution file has changed and then, only if it has, create a datetime stamped backup in a different folder. This can then run in the background of your real time trading. You would plot from the backup file.


I have a functional but not yet perfect program that reads and plots the real-trades, I will post it later today. You'll have a good start ;-)


Thanks for participating!


herman



Monday, February 9, 2009, 11:05:25 AM, you wrote:


> i can take a crack at this one too




> ------------------------------------


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker-afl/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker-afl/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-afl-digest@yahoogroups.com 

>     mailto:amibroker-afl-fullfeatured@yahoogroups.com


> <*> To unsubscribe from this group, send an email to:

>     amibroker-afl-unsubscribe@yahoogroups.com


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/




#383 From: "murthysuresh" <junkone1@...>
Date: Mon Feb 9, 2009 4:05 pm
Subject: Plotting TWS Real Time Trades.doc
murthysuresh
Online Now Online Now
Send Email Send Email
 
i can take a crack at this one too

#382 From: "murthysuresh" <junkone1@...>
Date: Sun Feb 8, 2009 9:41 pm
Subject: Re: Linking to Industry or Sector Charts
murthysuresh
Online Now Online Now
Send Email Send Email
 
try this. basically you can have your symbol in 1 pane and have the
following formula in the pane below.

industryGroupSymbolList = CategoryGetSymbols
(categoryGroup,CategoryFind("Industry Group Average", categoryGroup));
industry_symlist = CategoryGetSymbols (categoryIndustry , IndustryID
());
//printf(industry_symlist);
for( i = 0; ( sym = StrExtract( industry_symlist, i ) ) != ""; i++ ){


	 if (StrLeft( sym,2)  =="MG"){

		 if(StrFind(industryGroupSymbolList,sym)>0){

		 StaticVarSetText("industry_sym",sym);
		 printf("industry_sym_" +sym);
PlotForeign( sym, sym, ParamColor("Color", colorCycle ), ParamStyle
("Style") | GetPriceStyle() );
		 }
	 }


}
Title=" Industry chart is " + IndustryID(1) + " " + Name();
--- In amibroker-afl@yahoogroups.com, "MarketMonk777" <dlittner@...>
wrote:
>
> Hi folks,
>
> What I want: Is to have one window with a particular stock (for
example
> ADBE) and another window of a single sheet with the industry group
> associated with the symbol in the first window.  For example let's
use ADBE,
> my main window would contain my many sheets with various
indicators.  In
> another window I would like to have just one chart pane containing
the
> Industry Group for ADBE (that would be MG822 - Application
Software).
>
> Currently I have the following:
> I have a chart of ADBE in which there are 4 panes. The top one
contains the
> daily candlesticks, the next is a chart of the prices and volume of
the
> exchange that ADBE is on (Naz), the 3rd pane is a chart of the
prices and
> volume of the sector ADBE belongs to (MG820 - Computer Software),
and the
> 4th pane is a chart of the price and volume of the Industry ADBE
belongs to
> (MG822 - Application Software).  [Code orginally from Steve Dugas,
thanks to
> him for his extensive work with TC2005]
>
> What I noticed is that this chart and code pulls in the price and
volume
> information from each of the other symbols (COMPQX, MG820, and
MG822) to
> create that chart.  When I draw a trendline on let's say the
Industry chart
> in pane 4, and I go to the next symbol in that group, the trendline
does not
> appear.  Which makes sense because that trendline belongs to that
particular
> symbol regardless if it was on the pane containing data from the
industry.
>
> I actually noticed this while scrolling through a list of the home
builders
> and tried to mark a line of support for that industry and it did
not show up
> on the other charts.
>
> I have a lot of the Media General Industry charts already marked up
with
> trendlines, and horizontal lines to indentify support and
resistance.  It is
> this chart that I would like to have appear in a linked window such
that
> when I click on any symbol it brings up my previously marked up
chart of
> that industry.
>
> Is this possible?
>
> Dave
> MarketMonk777
>
> PS I am also uploading the attached picture "AAPL 7-7-06 Daily Exh
Ind
> Sub.png" to the files section in the TC2005 folder.
>

#381 From: Herman <psytek@...>
Date: Sun Feb 8, 2009 5:40 pm
Subject: [OT] AmiBroker-afl
psytek2
Offline Offline
Send Email Send Email
 

I just noticed that last activity on the -afl list was in July of 2008.


Would anyone know if this list is still active?


thanks,

herman


#380 From: Herman <psytek@...>
Date: Sun Feb 8, 2009 3:45 pm
Subject: AFL Projects for the UKB
psytek2
Offline Offline
Send Email Send Email
 

Please answer to this email on AmiBroker-afl. As I unannounced on the main list I have an assortment of ideas and code (nothing fancy!) that some users may find useful and may want to work on. As time permits I will share what I have, answer questions, and help with coding. This may help newcomers pick up afl programming techniques and speed up their personal projects. We will use AmiBroker-AFL to work on the posts. This effort is most useful to beginners however anyone can comment or participate.


1) The object is to produce documented code that can be posted on the User's Knowledge Base . Visit the UKB for examples. Topics can be tips, tricks, and afl code of any complexity. Neither presentation or code is expected to be perfect. The idea is to provide starter-afl and ideas that can be used by others in whatever application they are working on.


2) To allow tracking projects it is ESSENTIAL that the subject line of posts is descriptive and remains unchanged.


3) Below are some topics from my UKB folder. Completion varies from heading-only to some fairly complete work. A few topics may already be in the library or on the UKB, in which case it may be possible to improve on existing code - or we simply skip it. It would take me too much time to add descriptions, so, if a a topic sounds interesting tell me what you expect it to be (we might get some new ideas that way) and we can discuss it. 


Also feel free to add your own ideas/requirements: new topics welcome!


Best regards,

herman


  1. Accelerating Indicators.doc
  2. Applying TimeZones to the TWS Tradelist.doc
  3. Automated Chart Reviews.doc
  4. Automated Composite Generation.doc
  5. Bar Overlap in Real-time.doc
  6. Button Slider.doc
  7. Button to Set Numerical Parameters.doc
  8. Canceling Orders on the IBc PendingList.doc
  9. Chart Bookmarks.doc
  10. Chart Trading.doc
  11. Closing a Position.doc
  12. Collecting TWS Error Messages.doc
  13. Converting the TWSTrades file to csv.doc
  14. Creating Custom Titles.doc
  15. Creating execution timing alerts.doc
  16. Creating GTD and GAT Time strings.doc
  17. Creating InLine RealTimeComposites.doc
  18. Creating the Breakout Range Indicator.doc
  19. Data Cleansing.doc
  20. Data Latency - Ping.doc
  21. DBV RT.doc
  22. Debugging Loops.doc
  23. Debugging with Say.doc
  24. Deleting Composites.doc
  25. Designing a system using a loop.doc
  26. Detecting Parameter Change.doc
  27. Developing Entries using n-bar exits.doc
  28. Developing exits using Random entries.doc
  29. Developing Low Level GFX overlays.doc
  30. Display Last n Actions on your chart.doc
  31. Displaying Accounts Fields.doc
  32. Displaying Pane Execution Times.doc
  33. Displaying Portfolio Status.doc
  34. Displaying TWS Connection Status.doc
  35. Elastic Time.doc
  36. ErrorCodeExtraction.doc
  37. Exploring Bar Overlap.doc
  38. Exploring Intra Ticker Relationships.doc
  39. Feeding TWS Exported Tradelists into the Backtester.doc
  40. Finding coding errors.doc
  41. Flipping Signals.doc
  42. Forward DeGapping.doc
  43. GFX Custom Cursors.doc
  44. Gfx for dummies.doc
  45. GFX Popup Window.doc
  46. Gfx Title for Real.doc
  47. Global Parameters.doc
  48. Global Variables.doc
  49. HFAT eSignal.doc
  50. Intraday market behavior.doc
  51. LastBar Centering.doc
  52. Linear Regression based HHV.doc
  53. Linear Regression Channels.doc
  54. Looping.doc
  55. Maintaining a TWS Error.doc
  56. mark cursor across windows.doc
  57. Misc Debugging Tricks.doc
  58. OHL RT price bars.doc
  59. Optimizing Code for speed.doc
  60. Optimizing Dependent and Independent parameters.doc
  61. Optimizing in Real Time from an Indicator.doc
  62. ParamDateSlider.doc
  63. Parameter Signatures.doc
  64. ParamFile.doc
  65. PassCounters.doc
  66. Pattern Recognition.doc
  67. PersistentArrays.doc
  68. Placing an Order through the IB.doc
  69. Plot time remaining at last bar.doc
  70. Plotting a Breakout Range.doc
  71. Plotting Profit bars.doc
  72. Plotting TWS Real Time Trades.doc
  73. PlotTWSTrades.doc
  74. Price Prediction.doc
  75. Profit Targets.doc
  76. Putting the T3 in Overdrive.doc
  77. Relative Strength and Correlation.doc
  78. Replacing Bars with TickAveraged Data.doc
  79. Signal Averaging.doc
  80. Slideshow.doc
  81. Streak Analysis.doc
  82. Sync Window Data ranges.doc
  83. Synchronizing Global Parameters.doc
  84. Synthesized Voice Reporting.doc
  85. The Price Path.doc
  86. Custom Tick Chart.doc
  87. TWS Error and Order Status handling.doc
  88. TWS Error Message Parsing.doc
  89. Typical Indicator Development.doc
  90. UKB Demo AT exerciser.doc
  91. Using an Action Queue.doc
  92. Using IntraBar Arrays.doc
  93. Using Composites for Storage.doc
  94. Using Include files to store data.doc
  95. Using Inline Realtime composites.doc
  96. Using System States.doc
  97. Using the Auto Exported TWS Tradelist.doc
  98. Which comes first H or L.doc







Messages 380 - 409 of 409   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help