Click here to Login





                                                   Regarding trading after market hours

  0

0
GS
2012-10-08 05:27:16


Hi,

In my back testing I am limiting my trade timings between 9am to before 3:30pm, you can see the statement below. But during back testing there are couple of trades executed even after 15:30. One example is shown below. Why it is happening? and how I can overcome this discrepancy?

hr = hour();
mi = minute();

TradeTime = (hr > 9) and (hr <= 15 and mi < 30);

buy = TradeTime and buy-rule;
short = TradeTime and sell-rule;



Symbol Trade Entry Exit Perf Profit Shares Pos. value Nb bars Perf/Bar MAE MFE Scale In Scale Out Exit type

IFCI Long 2/16/2012 10:15 2/16/2012 15:45 0.066558051 4240.946525 1451 67958.9562 22 0.003025366 -0.0059929 0.074848388 0 0 Profit Stop



QuantShare
2012-10-08 09:53:31

  0

First, your time rule prevents you from buying or selling any position if the number of minutes is lower than 30.
Plot "TradeTime" on a chart to get a visual confirmation.

You should use instead:
st1 = 9 * 60;
st2 = 15 * 60 + 30;
stnow = hour() * 60 + minute();
TradeTime = stnow > st1 and stnow < st2;


Regarding the trade that occurred after "15:30". This could happen because an order can be initiated at "15:30" or before and executed few bars after that.
Update your trading system, select "Settings -> Capital" then set a lower value for "Orders are valid for...".



GS
2012-10-08 10:02:24

  0

Thanks a lot, appreciated much.


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Earnings after and before market opens
Market trading rules
Options Market - Trading volume data per Exchange for US Stocks
Currency Trading News from Yahoo - Forex Market
Market Timing Rules - Used to construct profitable trading strate...

How-to Lessons
How to hide stock data outside of regular trading hours
How to download a trading item from the Sharing Server
How to add future bars to plan for market scenarios
How to create a trading system
How to filter stocks in a market composite

Related Forum Threads
Can I download EOD data a few hours after market closed?
Highlighting extended trading hours on chart
How to Turn any ordinary trading strategy into a profitable one
MAJOR WORLD MARKET DATA
QS trading software

Blog Posts
How to Select the Best Market Indicator for your Trading System
How to use the new Market Regimes Feature in QuantShare Trading S...
Forecast volatility using trading rules and neural networks
QuantShare Trading Software: New Features in the 3.3.1 Version
Let me Show You How to Create Hundreds of Profitable Trading Syst...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.