Mike Medved
Administrators-
Posts
1,538 -
Joined
-
Last visited
-
Days Won
123
Content Type
Profiles
Forums
Blogs
Gallery
Downloads
Events
Everything posted by Mike Medved
-
Average between current candle and Open
Mike Medved replied to 3acor's topic in Scan and Paintbar Help/Discussion
Scanner at the top allows you to add indicators as variables. Add Volume indicator with MA as secondary parameter. -
Average between current candle and Open
Mike Medved replied to 3acor's topic in Scan and Paintbar Help/Discussion
I am not sure what you mean. Wouldn't the "Average" line in the Volume indicator do (if you use "Never" in Extended settings)? -
Average between current candle and Open
Mike Medved replied to 3acor's topic in Scan and Paintbar Help/Discussion
What value do you want to average? The "Change from Open" basically? Over how many candles? .fctbNone{ color:#000000; } .fctbStyle8{ color:#000000; }Average(20, Close-SymbolData.Open) - would do it for the last 20 candles BUT it would only show correctly for the last day (since SymbolData.Open is for current session only) If you want it correct for every day going back, the code needs to figure out what the Open for each day is, so would be a bit more elaborate. -
Feedback from using the Risk/Reward tool with hotkeys.
Mike Medved replied to alv123's question in Feature Requests
There is a shortcut for that. Just do a search in the shortcuts with "bead". -
First of all, am happy someone found trade beads useful. We have a lot of nifty features that I thought would be useful to traders - such as the trade beads, of option interest trees, or max pain box, that I don't get much feedback on, so I think no one uses them. There is already a clear beads shortcut. Look at keyboard shortcuts page in settings and do a search (the field uptop) for "bead".... The other two - will do although am not sure how useful the NumBeads variable will be. Also - if you have beads 1 2 and 5 turned on, the NumBeads will be 3.
-
Calculations including PreMarket
Mike Medved replied to ocram1980's topic in Scan and Paintbar Help/Discussion
What source are you using for backfills again? -
You found a bug The fix will be in next beta.
-
Calculations including PreMarket
Mike Medved replied to ocram1980's topic in Scan and Paintbar Help/Discussion
Not sure. But you can manually backfill. Just right click on TSLA and choose the option to backfill. -
I will look at this. The way it is right now is on purpose.. but maybe it can be changed.
-
Calculations including PreMarket
Mike Medved replied to ocram1980's topic in Scan and Paintbar Help/Discussion
OK I got your scan. Help me here so I don't have to dig through this - do I have to run the scan during the day or afterhours is ok? Which particular symbol does it fail on and what exactly is it showing that is incorrect? -
Calculations including PreMarket
Mike Medved replied to ocram1980's topic in Scan and Paintbar Help/Discussion
1. EMA is weird. It wants a LOT of data. 2. You do have the extended hours in scan set to "Always" same as in the chart right? 3. Try this: if your chart is showing let's say 20 days, do a SetDaysNeeded(20) call in your paintbar code. -
Calculations including PreMarket
Mike Medved replied to ocram1980's topic in Scan and Paintbar Help/Discussion
Yes, Auto-Backfill needs to be checked if you want all the stocks in your portfolio to be backfilled before a scan (and of course if your scan needs past data). -
Calculations including PreMarket
Mike Medved replied to ocram1980's topic in Scan and Paintbar Help/Discussion
I checked, and the MA is calculated on whatever shows, if you show premarket, MA is calculated using premarket values. Of course, as soon as the market starts, the volume jumps, becomes way over MA and you would get an alert. What you see (first opened the chart only with bars within the regular session. And after a few seconds he added the MA) is if you don't have premarket data to begin with, and get it from a backfill. But once you do get the backfilled data, next time you open the chart, it will be there. Also - alerts in MT only happen on "latest" data - that is, if you have a chart for a day and the alert condition is satisfied let's say 20 minutes ago, it won't trigger. It is only triggered on the last - rightmost - candle. -
Newbie has a couple of questions
Mike Medved replied to ocram1980's topic in Scan and Paintbar Help/Discussion
You already have the TriggerAlert in there. When you edit the parameters of your scan, there will be an Alert button in there - click on it to activate it and it will give you alert parameters where you can specify sound etc. -
The scan, when it runs, does not run only on the very last candle. It runs on every candle first (then, as the real time data comes in, it keeps running on the last and then new candles). So something like this will work .fctbNone{ color:#000000; } .fctbStyle4{ color:#0000ff; } .fctbStyle3{ color:#000000; } .fctbStyle2{ color:#008000; } .fctbStyle2Style4{ color:#0000ff; } .fctbStyle2Style3{ color:#000000; } .fctbNone{ color:#000000; } .fctbStyle4{ color:#0000ff; } .fctbStyle3{ color:#000000; } .fctbStyle2{ color:#008000; } .fctbStyle2Style4{ color:#0000ff; } .fctbStyle2Style3{ color:#000000; }int lastdaynum = -1; double CloseAt7 = 0; public void MainCalculation() { if (TradingDay.DayNumber != lastdaynum) { CloseAt7 = 0; lastdaynum = TradingDay.DayNumber; } if (CloseAt7 == 0 && Timestamp >= TradingDay.SessionStart.AddHours(3)) // session starts at 4am, so add 3 to get 7am { CloseAt7 = Close; } if (CloseAt7 == 0) SetScanResult(0); else SetScanResult(Close-CloseAt7); }
-
Static/Dynamic scan in the same scanner.
Mike Medved replied to ahujat's topic in Scan and Paintbar Help/Discussion
Let's say your scan result (that you pass in SetScanResult) is Double. Just have a Double variable set in the scan (outside the functions). Call it TriggeredValue. At start, set it to 0 (or some "invalid" value). When the condition is satisfied, set it to whatever you're passing to SetScanResult. And before you check for the condition, just say if TriggeredValue is not 0, SetScanResult to it and don't even continue checking for the condition. -
Indicator to draw high/low of day or previous days or premarket ?
Mike Medved replied to Niko's topic in Support
High/Low of the day or of previous day etc: put 2 horizontal lines on the chart, set one to show High of the Day, other show Low. Can play with parameters - make it regular session only High/Low of premarket - Opening Range indicator with a "trick" - set both the "opening period" and "go back into premarket" to something high. Like 900. -
String.ToPBShape() function?
Mike Medved replied to Thebattlefront's topic in Scan and Paintbar Help/Discussion
.fctbNone{ color:#000000; } .fctbStyle5{ color:#0000ff; } .fctbStyle6{ color:#800000; } PBShape shape = PBShape.A; string ShapeString = "Square"; Enum.TryParse(ShapeString, out shape); -
The two should match. The easiest way to check is to set Scan value to the histogram's value, and compare the value you see on the portfolio to the one you see on the chart. The problem you're seeing may be a mismatch either in the candle size or in the extended hours between the chart and the scan. Those should be exactly same in order to match.
-
make sure the extended hours on your scan is set to "never" if you want the 1st candle to be the first session candle.
-
.fctbNone{ color:#000000; } .fctbStyle4{ color:#0000ff; } .fctbStyle3{ color:#000000; }int DayNum = -1; double FirstMinVol = 0; public void MainCalculation() { if (TradingDay.DayNumber!=DayNum) { DayNum = TradingDay.DayNumber; FirstMinVol = BarVolume; } SetScanResult(FirstMinVol*10); }
-
Scan to detect candle pullback to near ema
Mike Medved replied to Arg's topic in Scan and Paintbar Help/Discussion
That would work. If you encounter serious slowdowns, the Count functions could be replaced with manually counting using two StateFIFOQueues. Instead of looping (which is what Count does). -
Do you mean period or frequency (candle size)? I am not really sure what you're trying to do. If you want your API-using program to do different things depending on what chart window is currently "active" then the APIKeyPressUpdate is what you want.