Hi
How do I write code that only permits 1 trade each day. For example the market opens (large volume) and my strategy meets its criteria and opens and closes a trade. I don’t want it to open another trade (even if my entry conditions are met) until tomorrow.
Thanking you in advance
There you go:
Once TradeON = 1
If IntraDayBarIndex = 0 Then
TradeON = 1
Endif
If MyLongConditions and TradeON Then
Buy at Market
TradeON = 0
Endif
TradeON is a flag that does the trick.