How can I adjust the code below to trigger only once;
// Definition of code parameters
TIMEFRAME (DAILY)
// Conditions to enter long positions only once
IF low <= Average[5](close) then
BUY 10 CONTRACT AT market
ENDIF
once per day or really once ?
if IntradayBarIndex =0 then
flag=0
endif
// Definition of code parameters
TIMEFRAME (DAILY)
// Conditions to enter long positions only once
IF low <= Average[5](close)and flag=0 then
BUY 10 CONTRACT AT market
flag=1
ENDIF
is that correct? fifi743
// Definition of code parameters
TIMEFRAME (DAILY)
//////////////////////
if IntradayBarIndex =0 then
flag=0
endif
//////////////////////
// Conditions to enter long positions only once
IF low <= Average[5](close)and flag=0 then
BUY 10 CONTRACT AT market
flag=1
ENDIF
How if I want to do the same strategy buying only once at the Weekly VWAP and Monthly VWAP and buying at any of the lower VWAP bands or selling at any of the upper VWAP bands either daily or weekly or monthly VWAP, I believe it works very well with gold.