Join useThinkScript to post your question to a community of 21,000+ developers and traders.
is this is the new update .
Afternoon.Okay I got the Version 8 up in Post #1. The link has also been updated.
I made the following changes. Sorry if I didn't get to yours yet. I DID NOT make any changes to the watchlist code.
- Added The Ability to Turn Off PreMarket High/Low Cloud
- Added Labels for PreMarket High/Low with Ability to Turn On/Off
- Changed the Global Color of Tk Pft to Pink (can be changed by user)
- Added the ability of Background Color Change to Match Bubble (Used in FlexGrid), Default if Off.
- Added different time frames. This controls the EMA Seperation Threshold and Last Sell Candle.
- Disclaimer. I quickly tested the EMA Seperation Thresholds on 1, 5, 10, 15, 30, and 60 minute time frames. No guarantee on signals or that they won't be a little early. I ran out of time. If you see an issue please let me know.If you want to use this on different time frames than you will have to change the first setting here:
I'll probably be off-line for the weekend but please don't hesitate to keep sending those suggested changes and/or problems
** I just noticed the profit/loss label does not work correctly on other time frames. Not really a big deal right now but I will look into it.Showing a $109,112.78 profit on TSLA on the 1-Min Chart, lol
I changed the entry orders to CallBuyBub and PutBuyBub because I assumed it would make the most sense. I then realized that some of my sell indicators are not working properly. Looking at VZ I get a TSICrossDown and a CallEMAPctSell but neither triggers a red candle or obviously a SellOrder. This is going to take a lot of trial and error since this code is getting so long. Any help would be appreciated.Thanks again for all the hard work on this strategy. I've done well this week with it. I've noticed a few things back testing though.
1. I've removed CallBuy and PutBuy from the AddOrder to stop it from triggering a buy on the first red or blue candle to get a more accurate back test. Its like this now
#BUY ORDERS
AddOrder(OrderType.BUY_TO_OPEN, ShowOrders and (CallBuy[1] or CallBuy[2])or CallBuy[3] and low <= FastEMA1 and low >= FastEMA2, FastEMA1, 100, Color.GREEN, Color.LIGHT_GREEN);
AddOrder(OrderType.SELL_TO_OPEN, ShowOrders and (PutBuy[1] or PutBuy[2] or PutBuy[3]) and high >= FastEMA1 and high <=FastEMA2, FastEMA1, 100, Color.GREEN, Color.LIGHT_GREEN);
2. The AddOrder will trigger up to 3 candles after a Green or Blue candle even if a red candle appears. Can this be coded to reset once a red candle appears?
3. Also once a trade starts if the candle turn grey before red it will continue with a big loss. Can this be coded to sell on a grey candle as well?
You don’t. This isn’t a perfect strategy and honestly TSLA is very hard to trade. That was probably a $1-$2 loss so in the grand scheme of things that’s not too bad. Backtest on TSLA show an approximate $165,000 gain over 6 months so I’d just take the loss and continue looking for opportunities. This isn’t the average trade with this strategy.how to avoid like this ..
TSLA ( Today )
Also look at the higher time frame analysis. 30 min. 1 and 4 hour charts all in a down trend.You don’t. This isn’t a perfect strategy and honestly TSLA is very hard to trade. That was probably a $1-$2 loss so in the grand scheme of things that’s not too bad. Backtest on TSLA show an approximate $165,000 gain over 6 months so I’d just take the loss and continue looking for opportunities. This isn’t the average trade with this strategy.
The EMA Separation Threshold. It is the difference between the 5EMA and 12EMA. There are different thresholds for different time frames. Also the last candle will always be a sell candle so I had to define what the last candle was depending on the time frame.What is different between 1,5.10 minutes
In rules to buy and sell are all the same reule
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.