Jump to content
Medved Trader Forums

Mike Medved

Administrators
  • Posts

    1,539
  • Joined

  • Last visited

  • Days Won

    123

Everything posted by Mike Medved

  1. That means it has a TriggerAlert in it.
  2. If you have a funded Ally account, there should be no restrictions. Go to Account View, look at your Ally account (this will let MT know you hae a funded Ally account), then restart MT.
  3. I wouldn't trust any indicators in Binance. They are pretty good at running an exchange, but probably not at doing charting/indicators.
  4. Just add a TriggerAlert to the code as well as SetScanResult
  5. Note that MT operates on the visible range, not on any particular number of bars.
  6. 1. Make a Simple paintbar 2. Make 3 rules in it. First one is SymbolData.Volume<=100000 and the action would have "And Stop" Second is MFI<20 - again, "And Stop" Third one MACD Hist crosses up 0 - put the SetScanResult in there.
  7. No - to find all those you either type SymbolData. <-- note the period - and look at the autocomplete. Or look in the simple scan editor's combo box.
  8. Binance (and most other crypto exchanges) does not send that data. IN fact, I think only GDAX bothers to send the current bid/ask. For others, you have to subscribe to the order book and figure it out yourself, which we don't want to do for portfolios, since it would be incredibly wasteful.
  9. Yes. "Max" is a function. "max" is a var. Sorry I am a bit too technical sometimes (in c# capitalization matters)
  10. Please go to the Help in Dashboard and do Check Updates. Then restart MT.
  11. As for your last one - I really cannot advise on the fine points of the scanning conditions/techniques I can only make sure that you can put in whatever conditions you want.
  12. Ok there is a bug in the code about the scanner. Change the code to have if ((Close == SymbolData.Low && CurrentState.IsNewLow) || Close<CurrentState.PrevLow) and it will be shown as a scan.
  13. Since all you're doing is finding a new low, there are no variables to the script. Variables are there to use indicators. No indicators are used.
  14. Hope it is profitable Happy New Years to you and yours.
  15. In the Scanning tab there is a button to edit parameters - they are at bottom. As long as the portfolio updates with RT quotes, the scanner runs on every update in it and lights up the results. That's the whole point
  16. If you want specifically NEW low (and not just at the low), you can't do it in basic. .fctbNone{ color:#000000; } .fctbStyle8{ color:#808080; } .fctbStyle2{ color:#008000; } .fctbStyle5{ color:#0000ff; } .fctbStyle7{ color:#000000; } .fctbStyle6{ color:#800000; } .fctbNone{ color:#000000; } .fctbStyle8{ color:#808080; } .fctbStyle2{ color:#008000; } .fctbStyle5{ color:#0000ff; } .fctbStyle7{ color:#000000; } .fctbStyle6{ color:#800000; } /// <summary> /// Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar /// </summary> private void PaintbarInitialize() { } /// <summary> /// Holds paintbar state - fill with variables needed to be preserved for next paintbar calc /// </summary> private struct PaintbarState { public Boolean IsNewLow; public Double PrevLow; } /// <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 /// </summary> private void PaintbarClearState() { CurrentState.IsNewLow = false; CurrentState.PrevLow = 0; } /// <summary> /// Saves paintbar state (called internally). /// </summary> private void PaintbarSaveState() { SavedState = CurrentState; } /// <summary> /// Restores paintbar state (called internally). /// </summary> private void PaintbarRestoreState() { CurrentState = SavedState; } public void MainCalculation() { if ((Close == SymbolData.Low AND CurrentState.IsNewLow) OR Close<CurrentState.PrevLow) { SetScanResult("New Low"); CurrentState.IsNewLow = true; CurrentState.PrevLow = Close; } else CurrentState.IsNewLow = false; }
  17. .fctbNone{ color:#000000; } .fctbStyle6{ color:#808080; } .fctbStyle2{ color:#008000; } .fctbStyle5{ color:#0000ff; } .fctbStyle4{ color:#000000;font-weight:bold;text-decoration:underline; } .fctbStyle3{ color:#ff00ff; } .fctbStyle1{ color:#a52a2a; } .fctbStyle2Style5{ color:#0000ff; }FIFOQueue SavedPrevCloses; FIFOQueue PrevCloses; /// <summary> /// Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar /// </summary> private void PaintbarInitialize() { } /// <summary> /// Holds paintbar state - fill with variables needed to be preserved for next paintbar calc /// </summary> private struct PaintbarState { } /// <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; Double PercentDrop = 0; /// <summary> /// Is called at start of paintbar calculation, should be used to clear the paintbar state /// </summary> private void PaintbarClearState() { DefinePaintbarParameter("Period", "Period", true, 1, 1000, 1, 10); DefinePaintbarParameter("Percent", "Drop %", false, 0.001, 100, 0.1, 0.1); var N = Convert.ToInt32(GetPaintbarParameter("Period")); PercentDrop = Convert.ToInt32(GetPaintbarParameter("Percent")); CurrentState = new PaintbarState(); SavedPrevCloses = new FIFOQueue(N); PrevCloses = new FIFOQueue(N); } /// <summary> /// Saves paintbar state (called internally). /// </summary> private void PaintbarSaveState() { SavedState = CurrentState; PrevCloses.CopyTo(SavedPrevCloses); } /// <summary> /// Restores paintbar state (called internally). /// </summary> private void PaintbarRestoreState() { CurrentState = SavedState; SavedPrevCloses.CopyTo(PrevCloses); } public void MainCalculation() { // calculate the EMA of the EMA PrevCloses.Add(Close); Double high, low; PrevCloses.GetHighLow(out high, out low); if (Close < high*(1-PercentDrop/100)) { SetColor(Color.Lime); // if used as a paintbar SetScanResult("Dropped!"); // if used as a scan } }
  18. 1. if you want to look for new high, you would have to check the State-stored previous high to current SymbolData.High, then save the current High to the State-stored previous high. 2. SymbolData.Volume is the cumulative volume for the current session
  19. LOL. Advanced mode is really for people who know (somewhat) how to code and a little of C# syntax. Ok I will make one and post it in a bit.
  20. You would have to use advanced mode of that. Create a FIFOQueue of the Y (as in Y minutes) size as a state variable and add the Close to it. Then you can get the high and low from the FIFOQueue and compare it to the current value. Help for FIFOQueue: https://www.medvedtrader.com/trader/WebHelp/circbuffer_class.htm the example at the end of this page should help too: https://www.medvedtrader.com/trader/WebHelp/state_keeping.htm
  21. The scan and paintbar code can be shared. You can run your scan as a paintbar (putting it SetColor instead of the TriggerAlert) and it will show up on the chart. For daily high, use SymbolData.High, for low SymbolData.Low - all these can be found in the simple editor's combo box lists.
  22. public void MainCalculation() { // this parameter will show in the scan/paintbar parameter editor and can be changed by the user DefinePaintbarParameter("PCT", "Percentage", false, 0, 200, 1, 0.2); // get the percent paramer var Per = GetPaintbarParameter("PCT"); if (Close > Low[1] * (1 + Per/100)) { SetColorAndShape("Breakeout", PBShape.ArrowNE, 0xFF00C50C); TriggerAlert("Breakeout"); SetScanResult("Breakeout"); return; } } As for your other suggestion - you can either sort on the scan column or filter the portfolio so that only the rows that have some scan result show.
×
×
  • Create New...