Seede, I had to put this aside for a while. I am in the middle of rewriting the whole Parameters window UI in AFL for my system. I also added auto selecting volume bar charts and range bar charts, but in the process I found out that the manual trades AFL below does not work with my new charts. I do not understand what the problem is yet. ATC is writing them but foreign reads them as null. It may be just related to the latest betas. I will have to look again later.
However, I am planning on using the principles of the manual trades for a number of purposes --including better trend line studies that would auto snap to a local peak or valley tagged to the database timeframe and extend a limited distance. All things I have requested, but I need them now and can't wait forever --I only hope I can figure out how to do it. I would like to hear about your ideas also. Dennis On Aug 27, 2007, at 2:40 PM, murthysuresh wrote: > Dennis > Do you have any updates. I have a few ideas and maybe we can work to > make it happen. > > Regards > > Seede > --- In [email protected], Dennis Brown <[EMAIL PROTECTED]> wrote: >> >> Hello, >> >> I wanted to be able to enter trades manually --representing the > ideal >> discretionary system trades for comparing different automated > systems >> trying to mimic them. I combined several different ideas I found >> here to make the code below. >> >> To operate, you select a name, make an empty ticker, then enable >> manual trades, select a bar and place a marker on it. >> >> It remembers the markers and can display them on any chart. The > same >> idea could be used to mark universal things on a chart such as >> options expirations, fed announcements, 9-11, other market moving >> news that would affect all charts in back testing. It could also > be >> modified to switch files 1-1 for each current ticker for ticker >> specific events. The advantage is that the data is retained > across >> different panes etc. --unlike drawn studies which can not be > shared, >> cut, pasted, and could easily be lost. >> >> So far, I have noticed a couple anomalies in operation that I > can't >> explain. >> The first time I enter a marker after starting AB, it seems to >> disappear after a bit and has to be reentered once. >> It lost my markers once, and I am not sure why that happened --the >> files were still there. >> Also, I wanted to have a way to make it hard to clear all the > markers >> by mistake. I was looking for a way to require the shift key down >> when clicking on the make empty ticker button as a fail safe. Or >> perhaps there is a way to make a confirmation dialog box. >> >> I would appreciate any help with these issues and comments for >> improvements. >> >> You make take the following code and use it or post it however you >> like as far as I am concerned. >> >> ~Dennis >> >> _SECTION_BEGIN("Manual Trades"); >> // This section allows manual trades to be entered and saved >> permenantly as a ticker >> // ~name1 is Buy flags >> // ~name2 is Sell flags >> // ~name3 is Short flags >> // ~name4 is Cover flags >> >> function saveManual(array, ManName) >> {AddToComposite(array ,ManName ,"x",atcFlagEnableInIndicator| >> atcFlagDefaults);} >> >> function saveAllManual(BuyMan, SellMan, ShortMan, CoverMan, ManName) >> { >> saveManual(BuyMan , ManName+"1"); >> saveManual(SellMan , ManName+"2"); >> saveManual(ShortMan , ManName+"3"); >> saveManual(CoverMan , ManName+"4"); >> } >> >> ManualName = ParamStr("Manual Trade Ticker", "~Kezha"); >> createManual = ParamTrigger("Make Empty Ticker", "Make Empty > Ticker" ); >> EnableManual = ParamToggle("Enable Manual Trades", "OFF|ON" ); >> setbuy = ParamTrigger("Buy", "Buy" ); >> setsell = ParamTrigger("Sell", "Sell" ); >> setshort = ParamTrigger("Short", "Short" ); >> setcover = ParamTrigger("Cover", "Cover" ); >> clear = ParamTrigger("Clear", "Clear" ); >> >> bi = BarIndex(); >> sbi = SelectedValue( bi )-bi[0]; >> >> if( createManual ) >> { >> saveAllManual(0, 0, 0, 0, ManualName); >> } >> >> if( enableManual ) >> { >> BuyMan = Foreign(ManualName+"1" ,"c"); >> SellMan = Foreign(ManualName+"2" ,"c"); >> ShortMan = Foreign(ManualName+"3" ,"c"); >> CoverMan = Foreign(ManualName+"4" ,"c"); >> >> if( setbuy ){BuyMan[sbi ] = 1; saveManual(BuyMan , > ManualName+"1");} >> if( setsell ){SellMan[sbi ] = 1; saveManual(SellMan, > ManualName+"2");} >> if( setshort ){ShortMan[sbi ] = 1; saveManual(ShortMan, > ManualName >> +"3");} >> if( setcover ){CoverMan[sbi ] = 1; saveManual(CoverMan, > ManualName >> +"4");} >> if( clear ) >> { >> BuyMan[sbi ] = 0; >> SellMan[sbi ] = 0; >> ShortMan[sbi ] = 0; >> CoverMan[sbi ] = 0; >> saveAllManual(BuyMan, SellMan, ShortMan, CoverMan, > ManualName); >> } >> PlotShapes( BuyMan * shapeUpArrow,colorGreen,0,L,-25); >> PlotShapes( SellMan * shapeDownArrow ,colorRed ,0,H,-25); >> PlotShapes( ShortMan * > shapeHollowDownTriangle ,colorRed ,0,H,-25); >> PlotShapes( CoverMan * shapeHollowUpTriangle,colorGreen,0,L,- > 25); >> } >> _SECTION_END(); >> > > > > > Please note that this group is for discussion between users only. > > To get support from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroker.com/devlog/ > > For other support material please check also: > http://www.amibroker.com/support.html > > Yahoo! Groups Links > > >
