Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
arne had a good question the other day.... concerning if "the explorer gave me the date (or the days to) the last signal" .....
after running an exploration thats looking for true or false conditions, such as "cross(c,mov(c,10,s)", when checking the results double click on the security and the 'exploration security column data' box comes up.... that box will list every day and give the 1 or 0 , true or false, signal for each day...
using the barssince function will solve the or the days to the last signal part.... the data box will give the date but you would have to scroll back in time using that small box and the slider, somewhat tedious esp if looking through 4000 bars and the signals are months apart....
patricks codes gives a much simplier solution in that the last valid signal date will always be supplied on every bar..... so there's no need for math, only a quick glance ... just replace his 'buy' with your codes or better still assign a buy value, buy:=Cross(C,Mov(C,10,S)); , which is i'm reasonably sure what he intended for us to do.... neat either way....
[color=blue:e513cec23b]patricks codes with assigned buy value[/color]
buy:=Cross(C,Mov(C,10,S));
(ValueWhen(1,buy,Year())*10000)+
(ValueWhen(1,buy,Month())*100)+
ValueWhen(1,buy,DayOfMonth())
[color=blue:e513cec23b]patricks codes before[/color]
(ValueWhen(1,[color=green:e513cec23b]buy[/color],Year())*10000)+
(ValueWhen(1,[color=green:e513cec23b]buy[/color],Month())*100)+
ValueWhen(1,[color=green:e513cec23b]buy[/color],DayOfMonth())
[color=blue:e513cec23b]patricks codes after[/color]
(ValueWhen(1,[color=green:e513cec23b]Cross(C,Mov(C,10,S))[/color],Year())*10000)+
(ValueWhen(1,[color=green:e513cec23b]Cross(C,Mov(C,10,S))[/color],Month())*100)+
ValueWhen(1,[color=green:e513cec23b]Cross(C,Mov(C,10,S))[/color],DayOfMonth())
added some more sym files , this time with names included........h
|