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

RE: [amibroker] Different curency databases (Tomasz)



PureBytes Links

Trading Reference Links

Yuki
Yes that will function in exactly the same way.

Regards,
William Peters
www.amitools.com



-----Original Message-----
From: Yuki Taga [mailto:yukitaga@xxxxxxxxxxxxx]
Sent: September 11, 2003 6:43 PM
To: William Peters
Subject: Re: [amibroker] Different curency databases (Tomasz)


Hi William,

Seems to work just fine!  Is there any reason I cannot modify the
built-in price chart the same way?

Thanks again!

Yuki

Friday, September 12, 2003, 1:12:11 PM, you wrote:

WP> Hi Yuki,

WP> Yes you've got the idea, the only difference is as follows:

WP> if (GetDatabaseName() == "XYZ") 
WP> x = 1.2; 
WP> else if (GetDatabaseName() == "YYY" OR GetDatabaseName() ==
WP> "QQQ" OR GetDatabaseName() == "ZZZ") 
WP> x = 1.0;


WP> However, if you anticipate that you will only have one USD
WP> database then you could do something like this, where "XYZ" is
WP> your USD database:

WP> if (GetDatabaseName() == "XYZ") 
WP> x = 1.2; 
WP> else
WP> x = 1.0;

WP> Regards,
WP> William Peters
WP> www.amitools.com



WP> -----Original Message-----
WP> From: Yuki Taga [mailto:yukitaga@xxxxxxxxxxxxx]
WP> Sent: September 11, 2003 5:56 PM
WP> To: William Peters
WP> Subject: Re: [amibroker] Different curency databases -- an AB pain in
WP> the butt?


WP> Hi William,

WP> This seems a very, very eloquent solution (except that yen would be
WP> 1.0 and USD would be 1.2).  ^^_^^

WP> I will rush to try it. Before I do, however, can I use 'OR' in the
WP> routine (more than one 'yen' database exists). For example:

WP> if (GetDatabaseName() == "XYZ") x = 1.2; else if (GetDatabaseName()
WP> == "YYY" OR "QQQ" OR "ZZZ") x = 1.0;

WP> In this case, "XYZ" would be a USD database, of which I anticipate
WP> having only one, and the other names would be yen denominated
WP> databases, of which I currently have 3, and might add a 4th.  It
WP> would be best if I could just say 'if "XYZ", 1.2; else anything else,
WP> 1.0'.  Can I write it that way?  If so, can you give me an example of
WP> that?

WP> Thanks!

WP> Yuki

WP> Thursday, September 11, 2003, 2:07:32 PM, you wrote:

WP>> Just a thought and it is not much of a change to your
WP>> formula. This type of formula it will perform the change
WP>> automatically for you depending on the database you have opened.
WP>> Just change the names from Yen and USD to the real names you have
WP>> given to your databases (case sensitive)

WP>> if ( GetDatabaseName() == "Yen" )
WP>> x = 1.2;
WP>> else if ( GetDatabaseName() == "USD" )
WP>> x = 1.0;
WP>> else
WP>> x = 1.0;

WP>> Title = Name() + "  -  " + WriteVal( DateTime(), formatDateTime ) +
WP>> "  - " + " Open: " + EncodeColor(colorYellow) + WriteVal(O,x) + " " +
WP>> EncodeColor(colorBlack)+ 
WP>> " -  Hi: " + EncodeColor(colorRed)+WriteVal(H,x) + 
WP>> " " + EncodeColor(colorBlack) + 
WP>> " -  Low: " + EncodeColor(colorBrightGreen) + WriteVal(L,x) +
WP>> " " + EncodeColor(colorBlack) + 
WP>> " -  Close: " + EncodeColor(colorYellow) + WriteVal(C,x) + 
WP>> EncodeColor(colorBlack) + "-  Volume: " + WriteVal(V,1);


WP>> Regards,
WP>> William Peters
WP>> www.amitools.com



WP>> -----Original Message-----
WP>> From: Yuki Taga [mailto:yukitaga@xxxxxxxxxxxxx]
WP>> Sent: September 10, 2003 5:18 PM
WP>> To: Tomasz Janeczko
WP>> Subject: Re: [amibroker] Different curency databases -- an AB pain in
WP>> the butt?


WP>> Hi Tomasz,

WP>> Wednesday, September 10, 2003, 8:21:48 PM, you wrote:

TJ>>> Layouts are stored PER DATABASE, therefore there is no obstacle
TJ>>> in using different set of indicators/charts/formulas in different databases.

TJ>>> Please check Tutorial: Working with chart sheets and window layouts

WP>> I have looked at this "tutorial" in the past, but it doesn't put
WP>> things in a way that I can understand, and I am very reluctant to
WP>> start playing around with settings that I do not fully understand,
WP>> having put tremendous time and effort into getting things set up
WP>> reasonably the way I like them for my Japanese database.

WP>> Question for you or anyone:

WP>> 1) If I modify a custom price chart, then save that as a local
WP>> layout, is the global default layout then immune to this modification
WP>> when I change databases?

WP>> For example, in one of my custom price charts, I have the following:

WP>> Title = Name() +"  -  "+ WriteVal( DateTime(), formatDateTime )+"  -
WP>> "+"Open: "+EncodeColor(colorYellow)+WriteVal(O,1.0)+"
WP>> "+EncodeColor(colorBlack)+" -  Hi:
WP>> "+EncodeColor(colorRed)+WriteVal(H,1.0)+" "+EncodeColor(colorBlack)+"
WP>> -  Low: "+EncodeColor(colorBrightGreen)+WriteVal(L,1.0)+"
WP>> "+EncodeColor(colorBlack)+" -  Close:
WP>> "+EncodeColor(colorYellow)+WriteVal(C,1.0)+EncodeColor(colorBlack)+"
WP>> -  Volume: "+WriteVal(V,1);

WP>> This is perfect for the yen, which is indivisible.  But I'd like to
WP>> modify this for the dollar, which would mean changing all the '1.0'
WP>> settings to '1.2', I believe.  (This also affects the pop up values,
WP>> of course.)

WP>> But I doubt if I can modify a formula for a custom indicator, and not
WP>> have the change take place globally.  Am I wrong?  The tutorial
WP>> doesn't speak to this, or at least not in a way that I can
WP>> understand.

WP>> Yuki





Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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