I am trying to enter a Limit Order at the Low of the Day of the bar that triggers the trade:
BuyAtLimit(bar, Low[Position.EntryBar], "Group1|");
However, this gives me the error:
CS0120 - "An object reference is required for the non-static field or property WealthLab.Postion.EntryBar.get"
I would also like to enter a Stop Order to exit at the Low of the day minus 1% of the bar that triggered the trade.
Any help much appreciated.
Thanks.
Size:
Color:
Of course this is worst biggest peeking mistake you can make, but instead of
Position.EntryBar (which doesn't exist), use
bar.
QUOTE:
Stop Order to exit at the Low of the day minus 1% of the bar that triggered the trade
Since you're peeking, the trigger day is the same as the Position's entry bar. So, in the exit logic...
CODE:
Please log in to see this code.
Size:
Color:
Thanks for reply. Very helpful. What does "worst mistake by peeking mean"?? I'm very new to coding so sorry for basic questions.
Thanks.
Size:
Color:
Size:
Color: