Hello, would you be interested in a script that scalped vector candles? I dont know how to code, I am trying by best to learn. I was able to assign the PVSRA colors and make my own vector candles indicator with emas. But would you do a video on this topic. Mad love and respect from the bitcoin community. The code should take a number of pips profit from each vector candle. This should result in 70% win rate, because that is what I average. I think the code can react faster and better than I can.... these are single candle in and out trades on the 1 min. Cheers!
Matt, this is awesome code, thank you! Interestingly, I ran your code on 2 hour candles, which changes the afternoon session to 1:30 Eastern. For some reason, on SPY (RTH) it gave 325 Range Expansion days, 40% continuation chance. On SPX (no RTH/ETH option), 1247 range expansion days, 30.87% change of continuation and ES1! (RTH) 2166 Range Expansion days, 23.92% chance of continuation. I tried turning "adjust data for dividends" on and off on SPY, but it didn't make any difference. I have SPY 2 h bars back to Nov 2008, SPX back to 2000 and ES1! back to 2014 (even on RTH. I'm going to modify the code so the date filter works and see if it makes a difference. But using ES1! results appears to be a very high probability trade, even if trading SPX or SPY. Personally, I'm looking for end of trend or start of neutral ideas for selling SPX credit spreads.
thank you... my subconscious had already noticed such patterns. but i couldn't formulate the rule. thanks for the precise explanation. sharing knowledge is the highest art of life. and you are a master at it. good work
Wow, I really like the way put the strategy into code. It seems so easy :) I always gete xcited about learning more pine when I see videos like this. Cudos to you and for giving out the script as well
Do you have a good method for exiting trades at the end of day? LEts say at 15:55. I tried with the the hour function: if hour = and if minute = ... but this do not work in higher timeframes. OR lets say exit 1 bar before 16:00... something like this. I need this because I do not trade in after market. So I have to close my trades before this time.
Hello! I have a morning-afternoon mean reversion strat I would like tested. It is a day trade with a defined trigger, stop loss and end of day take profit.
That's funny - the same video came up on my feed! Now, by next day, do you mean 12AM PST? Or do you mean 6:30AM PST NY market open? BTW: Thanks for doing the work to see if their observation was legit!
Hi thanks for your great lessons in pinescript Maybe you can write a few lines or make a video about this point... I tried to write a strategy, where just 1 order runs (no pyamide) and when the market increase, the stoploss points will set higher and higher. Pulling up behind the market. With a already running order, I only could change the SL point everywhere below the first order level. But never above. Could you tell me if this is possible and how? thanks so much BR Andreas
So the time frame of the chart doesn't make any difference? If not, using a higher timeframe like 1H gets much more candles for backtesting. I'm also looking at this on some Forex charts and it looks like the theory is even more true there!
I noticed this a while back, and have divided my RTH chart into two pieces: 9:30-12:00, and 12:00 until 17:00. If you put your VWAP/moving averages/etc. on these two different time charts, I think you're going to notice something very interesting - each session has it's own trading style.
After thinking on this a bit, I just realized that this technique/algorithm is obvious! (everything is obvious in hind sight, isn't it). All this is is Mean Reversion! If the range is bigger in the afternoon, then there is more power/force/energy/momentum behind the eventual close of the day price. If afternoon range is large, then it means the stock has wandered in excess in the direction of the days close. When a stock is in excess, it will subsequently mean revert (come back to where it was before). So in principle, there is no mystery to this working. Of course the devil is in the details of actually figuring how to compute its effect optimally since market theory predicts the perfect market should present no arbitrage opportunities. But for big enough and fast enough swings, the market may not balance out instantly, and so this offers a mean reversion opportunity it would seem.
*SMB Capital Video:* instagram.com/smbcapital/reel/Cz9jfwRSyjy/
*Script Source Code:* courses.theartoftrading.com/pages/analyzing-afternoon-vs-morning-ranges
Hello, would you be interested in a script that scalped vector candles? I dont know how to code, I am trying by best to learn. I was able to assign the PVSRA colors and make my own vector candles indicator with emas. But would you do a video on this topic. Mad love and respect from the bitcoin community. The code should take a number of pips profit from each vector candle. This should result in 70% win rate, because that is what I average. I think the code can react faster and better than I can.... these are single candle in and out trades on the 1 min. Cheers!
Matt, this is awesome code, thank you! Interestingly, I ran your code on 2 hour candles, which changes the afternoon session to 1:30 Eastern. For some reason, on SPY (RTH) it gave 325 Range Expansion days, 40% continuation chance. On SPX (no RTH/ETH option), 1247 range expansion days, 30.87% change of continuation and ES1! (RTH) 2166 Range Expansion days, 23.92% chance of continuation. I tried turning "adjust data for dividends" on and off on SPY, but it didn't make any difference. I have SPY 2 h bars back to Nov 2008, SPX back to 2000 and ES1! back to 2014 (even on RTH. I'm going to modify the code so the date filter works and see if it makes a difference. But using ES1! results appears to be a very high probability trade, even if trading SPX or SPY. Personally, I'm looking for end of trend or start of neutral ideas for selling SPX credit spreads.
thank you... my subconscious had already noticed such patterns. but i couldn't formulate the rule. thanks for the precise explanation. sharing knowledge is the highest art of life. and you are a master at it. good work
Wow, I really like the way put the strategy into code. It seems so easy :) I always gete xcited about learning more pine when I see videos like this. Cudos to you and for giving out the script as well
Thanks for such a great video!!! it is so good to be able to validate trading strategies - well done mate!
Do you have a good method for exiting trades at the end of day? LEts say at 15:55. I tried with the the hour function: if hour = and if minute = ... but this do not work in higher timeframes. OR lets say exit 1 bar before 16:00... something like this. I need this because I do not trade in after market. So I have to close my trades before this time.
Thanks The King of pinescript
Fantastic find and code! You da man for Pine Script! I think I’ll try it and see about maybe optimizing it further ;-)
How would you ideally make it check on the last bar of trading session instead of waiting for the first bar of new day to detect closing price?
Hello! I have a morning-afternoon mean reversion strat I would like tested. It is a day trade with a defined trigger, stop loss and end of day take profit.
Great analysis 👍
That's funny - the same video came up on my feed! Now, by next day, do you mean 12AM PST? Or do you mean 6:30AM PST NY market open?
BTW: Thanks for doing the work to see if their observation was legit!
Hi
thanks for your great lessons in pinescript
Maybe you can write a few lines or make a video about this point...
I tried to write a strategy, where just 1 order runs (no pyamide) and when the market increase, the stoploss points will set higher and higher. Pulling up behind the market.
With a already running order, I only could change the SL point everywhere below the first order level. But never above.
Could you tell me if this is possible and how?
thanks so much
BR
Andreas
Hi, can you launch your Real Test course as soon as possible please? I can hardly wait!
So the time frame of the chart doesn't make any difference? If not, using a higher timeframe like 1H gets much more candles for backtesting. I'm also looking at this on some Forex charts and it looks like the theory is even more true there!
I noticed this a while back, and have divided my RTH chart into two pieces: 9:30-12:00, and 12:00 until 17:00.
If you put your VWAP/moving averages/etc. on these two different time charts, I think you're going to notice something very interesting - each session has it's own trading style.
After thinking on this a bit, I just realized that this technique/algorithm is obvious! (everything is obvious in hind sight, isn't it). All this is is Mean Reversion! If the range is bigger in the afternoon, then there is more power/force/energy/momentum behind the eventual close of the day price. If afternoon range is large, then it means the stock has wandered in excess in the direction of the days close. When a stock is in excess, it will subsequently mean revert (come back to where it was before). So in principle, there is no mystery to this working. Of course the devil is in the details of actually figuring how to compute its effect optimally since market theory predicts the perfect market should present no arbitrage opportunities. But for big enough and fast enough swings, the market may not balance out instantly, and so this offers a mean reversion opportunity it would seem.
This is just a comment for promotion )