AVTParticipant
Senior
BarIndex should return an integer, I mean I could not imagine what else.
Day[N] needs an integer for N. But if I use the value of BarIndex for D, I get a complaint that an integer value is needed. Code:
defparam DrawOnLastbarOnly=true
i=BarIndex[1]
AFictiveBarIndexValue=700 // <= this works
//AFictiveBarIndexValue=i // <= this is not an integer
dofi=Day[AFictiveBarIndexValue]
id=IntradayBarIndex
dofid=Day[id]
Drawtext("BarIndex: #i#",barindex-20,0) // m1 changes around 729
Drawtext("Day of BarIndexValue: #dofi#",barindex-20,0.2)
Drawtext("IntradayBarIndex: #id#",barindex-20,0.4)
Drawtext("Day of IntradayBarIndex: #dofid#",barindex-20,0.6)
Return
Any ideas what that is?
Thanks a lot.
You need at least 1 bar elapsed to get an integer value with barindex[1]
AVTParticipant
Senior
Thanks for your answer Nicolas. I really don’t understand it, but I think at the moment you are too busy with other stuff to get this cleared. For the task behind that (get something which is special for today and compare that to previous days within an If-IntradayBarindex) I found a solution – hopefully, tests next week will show. So maybe somewhen later I might come back with that matter, if it’s ok for you.
Thanks for all your great work and have a nice weekend.