I'm struggling with a piece of code about testing intraday strategy
using no-time bar like ticks -Volume-range- bar, you could have an order filled into a bar that it was formed in less than 30 seconds.
I Think this isn't possible or better I would delete these trade.
When it happens i've set in strategy to exit at the close of bar,but i'm not able to delete this kind of trade.
I'd delete either the gain/loss and commision paid from NetProfit.
a big issue is when there are more bar with time less than 1 minute. i can't refer to the correct bar
I tested some strategieswith intraday data , on rangebars volume bars,ticks bars
.all is ok but i saw that sometime, foremost when there is fast market condition, some bars are being formed less then 1 minute , sometime are being formed in few seconds.
I've looked for skipping these trades but I've been only capable to close this trades in the close of the bar.
possible solutions can be to export data into excel and use a macro to delete or skipping these trade. someone knows if it is possible,because i don't know excel language .
I don't know about deleting it after the fact, but you can try to not take it in the first place. News events will generate many bars in rapid succession, check the Time_s from bar to bar and don't trade when say the last 2-3 bars print faster than 2 seconds apart.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
Put a tick chart as data 1 and the timeframe you are trading in data 2. That way you see every traded tick, but take signals from your preferred time frame. Its probably intermediate level programming to do it.
If you are using TradeStation, it might present a problem because you can't mix time based bars with advanced bar types or tick charts in Data1 and Data2.