[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Need Help from the Experts Pls



PureBytes Links

Trading Reference Links

Hi Sharad


  2] How to exit a position after "X" number of days in the System
  Tester

I'm assuming that you're using MS 9.0

Use the "Inactivity" Stop so that it kicks in after the required number of periods. I can't recall 
if points or percent is the best way to go, but set it to 999 (or whatever) so that the number is 
never going to be met and the stop takes effect after the nominated number of bars to exit the 
trade.

Another way to exit a trade is to use the entry signal for exit, but apply the appropriate delay to 
the signal used for the exit. This might not be as accurate when the exit period is longer than 
secondary entry signals.

You can also use a PREV latch to control the exit timing. This makes the System Tester run slower, 
but it's still accurate and acceptable.

  3] How to keep track of how many previous months, has the average
  price in the month (high - low) been above the current price - eg.
  want to list all stocks which have fallen to take support on their
  200 SMA and since the list will be long, want to rank them with
  respect to how many previous months have they been above the current
  levels.

This is a more complex question and I'd need your intention spelled out more clearly before I 
attempted to answer.

  4] How to enter at a particular price in the day in System Tester  -
  Eg. Go Long at price = 1% + Open if there is an Opening Gap. Want to
  enter into a position / Exit a position within a Bar and not wait for
  close.

The trick to entering and exiting on the same bar (intraday entry and exit on EOD data for example) 
is to forward reference the binary entry signal and price entry signals by one bar, and not do so 
with the exit signals.

What that does is makes the System Tester assess the entry on the bar before the exit, and it's 
quite happy then to execute the entry on the following bar if you add a Strategic delay to the Buy 
window. USE Strategic Delay of 1 bar for the entry.

The Buy window and the Price window must have the same code,except that the price Window will have a 
price spike to the proper price imbedded in it. If you wanted to enter at one cent higher than the 
open you could code like this.

{Buy window}
Ref( Fml("binary entry signal") ,+1);

{Buy Price window}
Ref( Fml("binary entry signal") * (OPEN + 0.1) ,+1);

Then add a 1-bar strategic delay to the Buy window.

Obviously Ref( Fml("binary entry signal")  represents your code, whether it be an indicator or full 
formula in the System Tester windows.

The exit code to sell 1 cent below the close would be.

{Sell window}
Fml("binary entry signal") ;

{Sell Price window}
Fml("binary entry signal") * (CLOSE - 0.1) ;

Those prices must fall within the HIGH/LOW range for the trading bar or the trade will not execute. 
There are tricks for making sure the System Tester does not fail to execute but I don't have the 
time to include them here.

You need to be flexible in your thinking when it comes to coding Prices for the System Tester, and 
you need to have the correct timing perspective when coding. Other than using the forward reference 
as suggested above you should NEVER look forward when coding, only look at the current bar and 
backwards. Your perspective must always be from the present looking to the past. Don't think in 
terms of "if this happens today and that happens tomorrow I'll enter the next day". You can do that 
in real life, but for the System Tester you should code "If this happened two days ago and that 
happened yesterday then enter today". Thinking that way will keep you from trying to execute at 
prices that are not valid on the following bar, and thus cause the buy to abort.

If you can reference Tom Sprungers article in the files section and put that together with my 
newsletter series on the System Tester you should be able to get consistent and accurate results out 
of the System Tester for every system you test. Either that or spend the time Tom and I did working 
out what the problems were and how they could be got around.

That's it from me.

Regards

Roy Larsen
www.metastocktips.co.nz




------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/