How can I get a condition that I can use in following code:
StartDate = Cross(DateNum(),DateBack) ;
(This is something wrong)
StartDate = (DateNum()=DateBack) ;
Apologies. Since this was more of a small part of the bigger code, I put it in open post. The code would look something like this:
Barsno=Param( "Bars", 244, 1, 6100 );
DateBack = Ref(DateTime(), -Barsno );
AddColumn(DateBack, "FromDate", formatDateTime );
//I wish to plot a shape say a HOLLOW STAR at the start date:
AddColumn(DateNum(),"Num");
AddColumn(DateNum()-Barsno,"Num-Back");
//How can I get a condition that I can use in following code:
StartDate = Cross(DateNum(),DateBack) ;
//(This is something wrong)
StartDate = (DateNum()=DateBack) ;
shapeStartDate=IIf(StartDate,shapeHollowStar,shapeNone);
But, when I am putting it in FROM date format, it throws out a wrong date (Refer the lower pane. While selection of date is for 03/24/2020, the BLUE traingle is shown around August 2022
Params are dependent on chart iD.
Chart and Analysis have different chart IDs (always zero in Analysis).
So if you change params in one of those two environments it won't change to same in other one.
Use static variables to apply same value in both ones.
The code seems to return BLANKS where historical data is available for lesser bars as compared to given date. Is there a way to check this wrt some particular scrip, say a benchmark using Foreign function? I tried following code, but the flaw lies in basic BLANKS coming through: