View Single Post
  #7  
Old 09-04-2009, 15:04
jezzer1961 jezzer1961 is offline
Level II Lasers Member
 
Join Date: Feb 2009
Posts: 27
Default

Quickly looking at the code, the basic rules are that it will go long at the start of a new bar if the previous bar

1) Closed above the ma
2) Had a low below the ma
3) The AO is rising

The opposite applies to shorts.

So with your trade that wasn't taken, it appears to be because the high of the bar wasn't above the ma.

You can easily adjust this yourself in lines 129 and 134 of the code if you feel it will improve things. I suggest you type // before the && Low and hit a return between the ma_cur and the ). This will mean that you can quickly reinstate things by removing the 2 slashes if the idea doesn't work in testing as intended.

If you alse look at line 75 there is a option for entering on bar close only which is set to true. If you type extern in front of bool, you will be able to experiment with entering on the current price bar.
Reply With Quote