CaptainX Posted September 6, 2022 Report Share Posted September 6, 2022 Hi I am new to Medved Trader software and stuggling to create a scanner but no luck. scanner for day tradding so only intraday I want to create a scanner when a stock price crosses up the high of the day (stocks setting new intraday highs) and the stock has atleast volume of 300,000. any help would be highly appreciated. if I can have a complete set of rules and condition in paintbar that would be PERFECT. Thanks in advance Quote Link to comment Share on other sites More sharing options...
CaptainX Posted September 6, 2022 Author Report Share Posted September 6, 2022 and can we also add a condition for share float for example new high intraday prive, minimum volume 300k with a maximum share flost of 30million shares. Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted September 6, 2022 Report Share Posted September 6, 2022 The problem is most likely the "crosses up the high" thing - in the case of the high, the price cannot cross up since as soon as price is above the high the high becomes that price. So best that you can do is price equal to high. Does that work? you may want to check a little more broadly, like if price is within 0.01 of high float is not currently available. 1 Quote Link to comment Share on other sites More sharing options...
CaptainX Posted September 6, 2022 Author Report Share Posted September 6, 2022 Thank you for the quick response, I am having this exact problem you mentioned. but its been just a week I am using Medved and I dont know how to do these thing. I can leave float but I still need want a condition of volume. can you please provide me something in detail how to create the above scanner with 0.01 of high with the volume condition, I can tweat with it and will try to adjust. Thanks a lot for your help. Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted September 6, 2022 Report Share Posted September 6, 2022 If you're ok with detecting "hit the high of the day" - whether the high changed or not - then this will do If you specifically want to detect "hit NEW high of the day" then you'd need to do it with "Advanced" paintbar. Tell me if that is what you want and I will post it here. Quote Link to comment Share on other sites More sharing options...
CaptainX Posted September 6, 2022 Author Report Share Posted September 6, 2022 yes please post it, I can try this one and use the time column to sort, hope it will work. just wanted to make sure one thing 300k filter I want to use is for the whole day. for example if since 4:00am the volume is above 300k then the scanner will trigger the alert. Thank you very much Mike Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted September 6, 2022 Report Share Posted September 6, 2022 In the code below, the part that is important is MainCalculation and the definition of the PaintbarState structure. The rest is automatically generated. ------------------------------------------------------------------------------------------------ /// <summary> /// Holds paintbar state - fill with variables needed to be preserved for next paintbar calc /// </summary> private struct PaintbarState { public int LastDayNum; public double CumulativeVolume; public double LastDailyHigh; } public void MainCalculation() { if (TradingDay.DayNumber != CurrentState.LastDayNum) { CurrentState.LastDayNum = TradingDay.DayNumber; CurrentState.CumulativeVolume = 0; CurrentState.LastDailyHigh = 0; } CurrentState.CumulativeVolume += BarVolume; if (High > CurrentState.LastDailyHigh) { CurrentState.LastDailyHigh = High; if (CurrentState.CumulativeVolume > 300000) { // trigger alert TriggerAlert("High", "New Daily High!"); } } } /// <summary> /// INITIALIZES paintbar. Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar /// NOTE: do NOT initialize the CurrentState here - the PaintbarClearState will be called AFTER this call, and will wipe it out. /// </summary> private void PaintbarInitialize() { } /// <summary> /// Holds current PB state - use to calc PB, changes to it carry over to next PB calc /// </summary> private PaintbarState CurrentState; /// <summary> /// Holds saved PB state - internal /// </summary> private PaintbarState SavedState; /// <summary> /// Is called at start of paintbar calculation, should be used to clear the paintbar state /// and initialize whatever variables you place into it. This is called AFTER PaintbarInitialize /// </summary> private void PaintbarClearState() { CurrentState = new PaintbarState(); } /// <summary> /// Saves paintbar state (called internally). /// </summary> private void PaintbarSaveState() { SavedState = CurrentState; } /// <summary> /// Restores paintbar state (called internally). /// </summary> private void PaintbarRestoreState() { CurrentState = SavedState; } Quote Link to comment Share on other sites More sharing options...
CaptainX Posted September 6, 2022 Author Report Share Posted September 6, 2022 I have put it in the advance painbar, the scanner name have a yellow mark with it and is not triggering any alert. am I doing it correct? Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted September 6, 2022 Report Share Posted September 6, 2022 1. Did you hit "Start" on the scanner? 2. I put in the TriggerAlert call in the code. For scanning, put in SetScanResult call. Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted September 6, 2022 Report Share Posted September 6, 2022 26 minutes ago, Mike Medved said: For scanning, put in SetScanResult call. in the sample code Mike gave, right after the TriggerAlert line, add:SetScanResult(true); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.