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

[amibroker] Re: Creating an artifical security.



PureBytes Links

Trading Reference Links

Tomasz,

In order to shift the security values back in time by one day, we 
need to use the following, (your code with one small change):

//To Shift Values Back One Day//

dummy = Ref(Foreign("merfx","C"),1);
FinalDayValue = 14;
dummy = IIf(Cum(1) == LastValue(Cum(1)),FinalDayValue,dummy);

Plot(dummy,"dummy",colorBlue,styleLine);

The difference is changing the -1 in the ref function to a +1.

Bill




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/