Short Term Volatility
Forums › ProRealTime English forum › ProOrder support › Short Term Volatility
- This topic has 22 replies, 2 voices, and was last updated 8 years ago by wolf.
-
-
09/16/2016 at 12:10 PM #1316209/16/2016 at 7:38 PM #1317209/16/2016 at 9:39 PM #1317509/17/2016 at 8:51 AM #13180
You can code it like this, make the summation of the last 6 Variation (6 x 5minutes candlesticks = 30 minutes) :
1condition = summation[6](Variation(close))>=1Didn’t test it though, but it should work ok.
1 user thanked author for this post.
09/17/2016 at 11:47 AM #13181Hi Nicolas,
I’ve tested it and it seems to work but still unsure as it is the weekend, but thank you for your help.
I would greatly appreciate it if you could breakdown the part of code listed below since I might need to adjust some conditions at a later date.
Thanks
Code:
condition = summation[100](Variation(close))>=1
IF condition THEN
buy 1 share at market
ENDIF09/17/2016 at 12:56 PM #1318209/17/2016 at 12:57 PM #1318309/17/2016 at 1:32 PM #13196Summation calculate the sum over the last X periods (100 in this case) of the value under brackets.
But in this statement, we test if this summation is superior or equal to 1. So if it’s true, the ‘condition’ variable is set to 1 (which is “true” in PRT language).
1 user thanked author for this post.
09/17/2016 at 2:16 PM #1320109/17/2016 at 2:39 PM #1320209/17/2016 at 4:30 PM #13206Hi Nicolas,
After doing some testing ive found out it works alot better in a screener format, ive only changed the code from ‘buy 1 share at market’ to ‘screener’ and ive found these issues:
- Code doesn’t display stocks that have fallen, only risen
- It doesn’t work alot of the time, for example to test the code, I found some examples where the stock has risen 1% or more in the last few hours of Friday’s trading day and adjusted the screener to the same amount of hours and the stock wont appear in the screener when it should.
- It works well when candles our on ‘daily’ (still only stocks that have risen) but when I put it on 10 mintues or 5 minutes I have many issues.
Any help is welcome, thank you
09/17/2016 at 4:56 PM #13208Yes this code is only for rising 1%, if you want to catch the falling stocks, just change the formula to find the ones that are <=-1% .. that’s all 🙂
I believe you have not real time access, only EOD?
1 user thanked author for this post.
09/17/2016 at 5:05 PM #13209Just added the falling stock code, and everything has gone crazy lol. Have I done something wrong? as it now picks stocks that havnt moved more than 1% in the last 30 mins. Ive attached a picture where you can see my code, the stock and the screener on the left.
Thanks for your help 🙂
Image: https://gyazo.com/925f98b99649fb9601bb6d8a7874e259
09/17/2016 at 8:34 PM #1321509/17/2016 at 8:37 PM #13216 -
AuthorPosts
Find exclusive trading pro-tools on