I'm trying to create a model in excel for trading foreign currency, but I have come across a difficulty when trying to get the model to make a decision about when to refresh certain data.
I have a single web query with the only cell of concern bering the changing price cell. I am importing the $US data from a page from finance.yahoo.com, which has a table with a refreshing price for the currency in terms of the Australian Dollar.
I wish to be able to record somewhere in my spreadsheet the lowest value of the price - but only for a period of time. I then wish to make this process reset after I make a purchase - (this way I don't get stuck with a cell which has a value that I can't use again when I start anew the buying formula i've written).
My trading strategy is to 'BUY' once the current price is a certain % above the 'LOW'.
Hence, is there a way for VBA code to do the following? =IF(('RefreshedPrice'>'PreviousPrice')*('Investment'>0), 'PreviousPrice','RefreshedPrice')
I thought maybe a mixture of using a formula that copies new data to a different place, and then only allow this data to be copied to the second place if it's smaller than what's already there? Hence some sought of IF function?
Thanks so much in advance if you have any ideas or contributions!
Bookmarks