|
I want a little of you advice in a making of a computer program.
Actually i recently made a very simple software. It basically captures the "stock market" transactions. After capturing tractions, the decision of buying or selling is made according to some pre defined formulas. For example
1) If total shares purchased are greater than 50 and and stockmarket opening time is 9:30 AM then sell 23 shares.
2) If stock market opening time is greater than 9:30 then do not buy any share till 11:30 and after 11:30 use formula ABC to get share difference and if difference is negative than buy that share.
There are 11 such conditions defined by our client. We've hardcoded all these condiotions in our source code.
Now the problem is that, these conditions are hardcoded and client daily wants to change conditions or define new conditions. Whenever client wants to enter new condition, it call us, then we add such condition or formula in the source code and then send updated copy.
Now we want to make this generic i.e we want to add new feature so that our client can himself add new condition or change existing at runtime. This is where i require your advice. suppose if you were at my place that what had you done ? Does the solution lies in writing parser/compiler.
Imtiaz
|
|
|
|
|
Hi
With my experience I would model all the possiblity and a create a customizable software. The action to be taken could be defined by the client itself.
Represent all the condition by the some variables. And give interface for the client to present their condition using those variables.
Hope it helps you some way
Regards
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
|
bryce wrote:
use a a maths parser
What is Maths Parser? Is is something open source or not. Does it support conditional checks like IF/Else or only expressions. Where can i get more information ?
Imtiaz
|
|
|
|
|
I would not write a parser/compiler. I would consider embedding tcl (http://www.tcl.tk/) or python (http://www.python.org/) if I needed the ability to script. Check the licenses with your lawyer of course. I'm not sure if you need the ability to make things fully programable though. (This is partially my baises though, I don't like Perl or Visual Basic.)
Check how mail programs and firewalls do filters. There are lessions to be learned there, even though they won't all apply. Some mailers have GUIs that make is simple to write filters. I think you want to follow their examples.
Find out from your client what rules they are likely to want. Get them to dream, not everything can be done, but you want to know what they can come up with.
Since they are likely to write rules, make sure every rule as a max dollar amount it applies to before it flags someone to review. They can take the loss of $100 here and there from a broken rule, but if the rule triggures a trade that would cost them $1,000,000 they should review it by hand first. If you can come up with other ways to protect them from themselves do it. (careful here, you want to protect them from mistakes, not annoy them by flaging everything!)
Also make a simulator. Something so that they can make the rules, and test them on. Something other than real money. Perhaps keep a log of last weeks prices, so you can say "if this rule was in effect last week you would have traded ...". Give/recomend some books on software testing. (even if they never read them, at least you tried)
|
|
|
|
|
Do any know where I can find SDK's for creating true type fonts.
Thanks & Regrads,
Deliver
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
|
In Win32 Application I created dyanmicaly two edit boxes with CreateWindowEx(..) with WS_TABSTOP style. I set the focus to first Edit control in the code.
When I run the application two edit boxes are appearing and the focus is set to 1st edit box. When I pressed the tab key the focus not changing to 2nd edit.
Can I get any help, and the reason? Thanks in advance.
Murali.
|
|
|
|
|
Change the z-order of the created edit box. you can use SetWindowPos() for this.
There is no spoon.
mail
|
|
|
|
|
Can you explaine how z-order helps in solving my problem? Can you tell me the signifance of z-order here.
|
|
|
|
|
pEdit2->SetWindowPos(pEdit1,0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
Hope this helps.
There is no spoon.
mail
|
|
|
|
|
Moving focus between controls in a dialog is handled by the Windows dialog manager. If the window containing the controls is not a dialog you will have to handle changing focus yourself in your window procedure. (Assuming this is not an MFC app.)
You would have to process WM_CHAR messages and do the appropriate SetFocus when you get TAB. You would also have to check for the Shift key if you had more than two controls.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
i have written complete code for this program and it is running almost fine it is just not giving proper display in the last screen in the output.
please help me just reply me so that i will send you the source code files and if you want i can connect through netmeeting to show what is going wrong on the output screen. I am also available on msn as youngashish@hotmail.com
and at yahoo as young_ashish@yahoo.com
please please help me
just reply me so that i can send you the source code files.
|
|
|
|
|
Ok send me the code to azghar_hai@hotmail.com
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
wot does this program do?
There is no spoon.
mail
|
|
|
|
|
can u come online at MSN Messenger so that it will be easy for me to explain and if possible it would be much better if we come on netmeeting so that i can show you what exactly the output should nad where it might be screwing up.
I am on MSN as : youngashish@hotmail.com
please do reply.
|
|
|
|
|
I want to send data to device.
What I use function?
|
|
|
|
|
|
|
Hi All
Can anyone say how can i convert a fisheye image to noraml image ? any algorithams ?..
If anyone knows anything about this , pls give me that information.
Thanking U
Krishnan
If u can Dream... U can do it
|
|
|
|
|
Hi there,
I am learning C and I am stumped by this question about for loops. I know how to make a loop but not sure how to get the 1*1*1 etc into total.
Given int variables k and total that have already been declared , use a for loop to compute the sum of the squares of the first 50 whole numbers, and store this value in total . Thus your code should put 1*1 + 2*2 + 3*3 +... + 49*49 + 50*50 into total . Use no variables other than k and total .
Thanks in advance,
Jennifer
|
|
|
|
|
How about this? [edit]Got the wrong number in the for statement [/edit]
total = 0;
for(k=0; k<50; k++)
{
total = total + (k * k);
}
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thanks so much. I just had the total equation wrong!! YEAH!! Thanks so much.
|
|
|
|
|
Hi,
k=1;
total=0;
while(k<=50)
{
total=total+(k*K);
K=k+1;
}
Regards.
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Given an int variable k that has already been declared , use a while loop to print a single line consisting of 97 asterisks. Use no variables other than k .
or this....
Given an int variable n that has already been declared and initialized to a positive value , and another int variable j that has already been declared , use a while loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j .
Any ideas. I have lots of questions like this. I just need help with one of them so I can work with the rest!
Thanks in advance.
|
|
|
|