Hi Jock,
This is a combination of two boolean. Only when both are True then the combined condition is True. Can EntryDate(1) < Date be False?
I actaully don't understand what you want to do with:
If (marketposition = 0 and entrydate(1) < date) then buy at OpenD(0) + 0.3*AvgTrueRange(1) of data2 stop;
Edited to add:
When is this order issued?
It should not take long. You can try it out.My only concern is that if I need to calculate a very long daily ATR value, for example ATR(200) then the array may take some time to run.
If (marketposition = 0 and entrydate(1) < date) then...Meantime I have actually come up with a way of being able to refer to data2 without using the "date of next bar" command â¦
If (marketposition = 0 and entrydate(1) < date) then buy at OpenD(0) + 0.3*AvgTrueRange(1) of data2 stop;
The only problem with this simple code is that it wonât take a trade on the very first bar of the day.
This is a combination of two boolean. Only when both are True then the combined condition is True. Can EntryDate(1) < Date be False?
I actaully don't understand what you want to do with:
If (marketposition = 0 and entrydate(1) < date) then buy at OpenD(0) + 0.3*AvgTrueRange(1) of data2 stop;
Edited to add:
When is this order issued?