Correction...
Correction to the statement below...
"Lets say the stochastics were hovering at about the same value. Up ticks may cause if to report a bullish cross, then down ticks could cause it to negate this cross. With my code, the cross action would be recorded and action could be taken based on this condition."
should read...
Lets say the stochastics were hovering at about the same value. Up ticks may cause if to report a bullish cross, then down ticks could cause it to negate this cross. With my code, the cross action would be recorded and action could be taken based on this condition. if the stochastics (throught tick-by-tick trading) crossed up 5+ times within a bar, then without our timestamp, the system MAY try to enter 5+ times...
The solution to this is really with the StrategyisInTrade variable and the timestamp. In the code examples I have provided, the StrategyisInTrade variable would also prevent the system from trying to enter multiple entry signals. But, if the entry code did not include the test for StrategyisInTrade, the time stamp would provide an alternate solution.
The time stamp solution also prevents a system from entering a trade, getting stopped out (or reaching a profit target), then re-entering on the same bar. This is critical because you may not want your system to be able to do this. The strategyisInTrade variable will not assist you with this type of problem - only time stamps will assist in resolving this issue (as far as I know).
More later..
Brad (a coding fool).
Correction to the statement below...
"Lets say the stochastics were hovering at about the same value. Up ticks may cause if to report a bullish cross, then down ticks could cause it to negate this cross. With my code, the cross action would be recorded and action could be taken based on this condition."
should read...
Lets say the stochastics were hovering at about the same value. Up ticks may cause if to report a bullish cross, then down ticks could cause it to negate this cross. With my code, the cross action would be recorded and action could be taken based on this condition. if the stochastics (throught tick-by-tick trading) crossed up 5+ times within a bar, then without our timestamp, the system MAY try to enter 5+ times...
The solution to this is really with the StrategyisInTrade variable and the timestamp. In the code examples I have provided, the StrategyisInTrade variable would also prevent the system from trying to enter multiple entry signals. But, if the entry code did not include the test for StrategyisInTrade, the time stamp would provide an alternate solution.
The time stamp solution also prevents a system from entering a trade, getting stopped out (or reaching a profit target), then re-entering on the same bar. This is critical because you may not want your system to be able to do this. The strategyisInTrade variable will not assist you with this type of problem - only time stamps will assist in resolving this issue (as far as I know).
More later..
Brad (a coding fool).
Comment