The Trade Magic code ... can you put the code ?
TRADEMAGIC
Please check the file
I am not aware of VBA programing but use Excel to its fullest( or at least so I think !) ... I am trading on the stock exchange( and needless to say loosing !), but I am sure that if someone can make this code .. I will not loose ! Please remember that Live values are always changing fast.
Please help me if you can ... I will be highly obliged.....it is a very difficult task as much as I can envisage ! BUT it could be a child's play for a Veteran !
Attachment | Size |
---|---|
The TradeMagic.xlsm | 10.34 KB |
RE: The Trade Magic code...
Hi,
It can be done but I think your requirements are not clear enough. Please, let me to explain. Firstly, I will post here your conditions for clarity:
1) for D2: = IF(B2 > OldValueB2, (C2 - OldValueC2) + OldValueD2), OldValueD2)
2) for E2: = IF(B2 < OldValueB2, (C2 - OldValueC2) + OldValueE2), OldValueE2)
3) for F2: = IF(OR(B2 > OldValueB2, C2 > OldValueC2), 1 + OldValueF2, OldValueF2)
4) for G2: = IF(OR(B2 < OldValueB2, C2 > OldValueC2), 1 + OldValueG2, OldValueG2)
Now, here is your example scenario:
The next happening is this that the price remains the same but TTQ changes from 200 to 250, then D2 should become 250 and F2 = 2
In your conditions 1) and 2) you use ">" and "<" but not "=" for value of B2, and also is not mentioned how values of D2 or E2 depends on value of TTQ as this is shown in 3) and 4). Am I right or I miss something?
Based on conditions 3) and 4) not only F2 = 2 but G2 = 1 because of this part: C2 > OldValueC2. Is this is right?
Another thing which is not clear for me - you wrote:
TTQ (Total Traded Quantity) will always be a greater positive integer with time.
Is this mean, based on your example, that the value of TTQ will never be less than 200, for example 190, and after become 250 will never be less than 250, for example 235? If this is true, the condition like C2 > OldValueC2 is unnecessary. Correct me if I'm wrong.
...
I will wait for your clarification for now.
Best regards.