I am developing a strategy that has multiple entries.
At the same time the BarsSinceEntry feature is not working properly, because it only counts the barssincentry of the very first order.
Since I am likely to have 20..and 30 orders at the same time, I is not feasible for me to name each different order...in order to be able to refer to each one individually with the BarsSinceEntry
This is why I decided to store the current time as a variable whenever an order is placed, and then to add a switch that would turn on/off trading as a whole in case the live current time[x amount of bars ago] < than the stored current time.
I am trying with the following code, but I am having difficulties.
Whenever I make an order, I store it with the following:
ToTime(Time[0]) = ToTime(LastHour, LastMinute, 0);
and then I run onbarupdate
if (ToTime(Time[MinBarsForBuy]) >= ToTime(LastHour, LastMinute, 0))
...turn on trading
I think I am messing something up, because I can't compile and I get an error "Left hand side of an assignment needs to be a property, a variable or indexer"
Please help!
Comment