Enter or close a trade near close
Author: pestocat2
Creation Date: 4/16/2018 6:26 PM
profile picture

pestocat2

#1
I would like enter or close a trade near the end of the day or close. I assume I need to use the intraday candles, I'm thinking 30 minute ones. For the indicator settings I assume I will need to multiply the daily ones by 13 is that correct.
profile picture

Eugene

#2
A wise man's question contains half the answer, they say. Naming a topic like "Intraday Trading" is suboptimal and too generalized. Let's make it "Enter or close a trade near close" then. If a topic is named in a more descriptive manner it would pay for itself as a search reveals solutions instantly. For example, if you searched for "close" you'd find this informative thread:

Exit before market close

As an alternative, you can accomplish this on Daily bars with a trick described in the WealthScript Programming Guide > Programming Trading Strategies > Alerts > How to: Alert for AtClose Signals.
profile picture

pestocat2

#3
I have looked at "How to: Alert for AtClose Signals" many times and I have not yet understood "bar +1" it would seem that we are buying at the next day opening. What am I missing.
profile picture

Eugene

#4
You asked for "enter or close", so this was the exit technique. (A more complicated example can be found in Techniques > Exit Intraday AtClose.)

In general, doing what you said about the indicator settings is incorrect. In Wealth-Lab you can compress intraday data to daily scale as described in the WS Programming Guide > Multi-Time Frame Analysis > Intraday/Daily.
profile picture

pestocat2

#5
I want to use daily bars for the indicators with 30 minute intraday bars. Then make the buy/sell 30 minutes before close. I've read and re-read the programming Guide for Intraday trading but don't see a method. The crossover speed should be at the daily rate and not the intraday rate.
profile picture

Eugene

#6
profile picture

pestocat2

#7
I'm just not getting the concept of using "SetScaleCompressed() or RestoreScale(). What changes do I make to my original indicator settings. I'm having trouble getting this.
profile picture

Eugene

#8
SetScaleDaily in your case, not SetScaleCompressed. The changes to be done depend on your Strategy code. You'll find them documented in the WS Programming Guide and thoroughly exemplified in various forum posts, QuickRef (F11 key in Wealth-Lab), downloadable Strategies (Ctrl-O in WL), and the Wealth-Lab Wiki.