Hey Guys:
I know nothing about using the programming script. I am trying to get this script to buy a security at market open if the price increased by => 5% overnight. This script is not doing that, but I don't know how to make the necessary changes.
Can anyone help?
CODE:
Please log in to see this code.
Size:
Color:
Hi,
Option 1. You cannot really condition a market order that way because you place it before you know the open price but a stop should do it:
CODE:
Please log in to see this code.
Option 2. The Fidelity static provider filters out pre/post market data for stocks. With GetSessionOpen you can issue a market order
shortly after the open but it's less convenient e.g. have to schedule the strategy in the Strategy Monitor with custom Execute time like 9:35.
CODE:
Please log in to see this code.
Option 3. I created a
premarket scanner for MarketWatch.com so gaps up/down can be known beforehand. This can be used for live trading stocks that are about to gapp up with a simple BuyAtMarket script.
Size:
Color:
For Option 2, in the line below, please explain to me when openTradeBar would be a negative price. That is, when openTradeBar>0 is not true.
CODE:
Please log in to see this code.
Size:
Color:
It does not imply that openTradeBar can be a negative price. But it can and will be 0 in a situation documented in the QuickRef > GetSessionOpen property.
Size:
Color:
Thank you!
Size:
Color:
You're welcome. Oops, I missed the link to the premarket scanner (Option 3) yesterday. Here it goes:
Fidelity limit doesn't place if 10% lower, see post #10
The code works but has to be run during premarket, not before.
Size:
Color: