PDA

View Full Version : ExtFml( "TradeSim.EnablePriceFilter") how to use


gawdib
12th May 2004, 03:37 AM
I did a search in the tradesim manual (in adobe) to try and find out how to use the ExtFml( "TradeSim.EnablePriceFilter");

The search came up with nothing. Please help me find out where information is about this extfml.

I still do not see how it is possible for tradesim not to register an exit price when I give it the choise of using the open or a trailing stop. This would occur at the point that the day's price excursion turned out to be lower than the value of yesterday's trailing stop., IN the exit trigger, I already instruct the system not to exit unless todays low is lower than the value of yesterday's trailing stop, then in the exit price tradesim always has "Exitprice":= min(fml("yesterday's trailing stop value"),open); Thus, it is never possible that today's price excursion would not include either the open or yesterdays trailing stop value. therefore the trade should always be accepted,but i find the metastock explorer will not accept most of the trades that the expert shows. Thank you, regards, geoffrey

Back to top

David Samborsky
12th May 2004, 11:37 AM
You won't find a description of the EnablePriceFilter in the manual because the function was added after the manual was written. The latest readme file lists all of the added functions.

I already instruct the system not to exit unless todays low is lower than the value of yesterday's trailing stop, then in the exit price tradesim always has "Exitprice":= min(fml("yesterday's trailing stop value"),open); Thus, it is never possible that today's price excursion would not include either the open or yesterdays trailing stop value. therefore the trade should always be accepted,but i find the metastock explorer will not accept most of the trades that the expert shows. Thank you, regards, geoffrey

Believe it or not you may find in some cases that yesterdays trailing stop is higher than todays high in which case the trade will be rejected. ie an example is a price gap downards which automatically makes the trailing stop higher than todays high.

Check the error log to see why exactly the trade is being rejected. This will give you some clues.

gawdib
13th May 2004, 12:45 AM
Yes. I am aware of the issues that you mention. That is why I put in the metastock "min" command.
perhaps you do not know about this metastock function.

thus the exit price is not limited to the trailing stop value, of course. Thus, if today's price gaps below the trailing stop then the exit price is commnaded to be the open price, since I used the "min" function. the "min" function of course, commands that what gets registered as the end of the trade is the "min"imum of either the open or the trailing stop value of yesterday.

If you please, I need more than a listing of the new enablepricefilter.
I need some explanation of what it does and how to use it.
I searched through all the read me notes. I could not find anything of the price filter. Ccold you please be so kind as to provide more detail of how to find this information.

thank you very much. Regards, geoffrey

David Samborsky
13th May 2004, 01:32 AM
Just insert the function call to the EnablePriceFilter after the call to the Initialize function.

Beaware that enabling the filter will always constrain prices to lie in the daily range even if your price parameters fall outside the daily range.

gawdib
14th May 2004, 12:40 AM
Clearly, then, the price filter function is not going to help. why does the metastock"min" command not work? thank you, regards, geoffrey

David Samborsky
14th May 2004, 01:48 AM
To see why it is not working I would suggest that you check the error log to see why the trades are being rejected.

gawdib
14th May 2004, 04:12 AM
the message log indicates no problems.

when i use the " min" funciton, then only 1824 trades are taken. no invalid trades are indicated. 70% of stocks are rejected by explorere.

if i use a simple open or close for the exitprice, then 2 % are rejected and 3223 trades are registered.

As i have indicated before, the night before I put in orders to sell the stock the next day at one of 2 prices (by use of the min function (which the expert allows to work)
1. at the trailing stop value, if the stock price xcursion at any time touches the trailing stop value, or
2 at the open price, shoulc the stock open below the trailing stop value

metastock language: exit price:= min(fml("trailing stop), open).

so why does tradesim fail to work? and if it will no t work with metastock, is there another way of getting the proper exit price registered in the tradesim database?? thank you, geoffrey

David Samborsky
16th May 2004, 02:19 AM
Im not talking about the message log in TradeSim.

The error log can be accessed from the start menu by going to

Start->Programs->TradeSim->View Error Log

The error log lists any errors after generating a trade database.

gawdib
16th May 2004, 07:17 PM
As indicated before ,

the problem is not that tradesim rejects the trades, but that

metastock explorer rejects

most of the stocks, WHENEVER
I put in the above indicated TRADESIM CODING
to tell what the exit price should be.

Again, explorer has no problem with a simple "open" or "close" for "exitprice", but I do not exit at the end of the day or the next day.

Each day begins with my stop limit order (allowing slippage, etc etc) already in place before trading begins for the day.therefore, it will be set off
DURING THE DAY.

What I need to do is have the exit price be registered,
in the file that meta. explorer generates,
as the exit price that my system has me exiting with
( my trailing stop is not based on subtracting a certain amount from "some point" so the tradesim trailing stop function cannot be used, FROM WHAT I can fathom about how this function works).

thank you, regards, geoffrey




ps
By the way, it was impossible to try and find an "error log", after I followed your directive above to open tradesim. I did an adobe search to try and find error log and it came up with nothing. In order to help future new users ( after a lot of tyring around) , one has to first go through tools menu, open a database, etc, etc, i HAVE REENTLY DOWNLOADED ALL UPDATES.

David Samborsky
17th May 2004, 02:25 AM
The error log file should have been installed when you installed TradeSim.

It is called errorlog.txt and is installed in tradesimdata directory and is refreshed everytime you run a trade database exploration .

With regards to price you can exit at any price you wish as long as it is contained within the daily price range of the respective entry/exit trigger.

For example (H+L)/2, (H+L+C)/3 are examples of valid entry or exit prices and will not cause the trades to be rejected. Ref(L,-1) may cause problems because it may lie below the low of the day in which case the trade will be rejected.

If your price lies outside the daily range then the trade will be rejected because the price never occurred in practice. In this case using the price filter will confine the price to lie within the daily range and has the same effect as the following MS code.

ActualEntryPrice:=if(EntryPrice<L,L,if(EntryPrice>H,H,EntryPrice));
ActualExitPrice:=if(ExitPrice<L,L,if(ExitPrice>H,H,ExitPrice));