Jump to content
Medved Trader Forums

Create Scanners


Recommended Posts

Ok - in simple mode you cannot do that. Just no prepared variable to simply compare it.

 

In advanced mode (and let's say 1-min chart mode), you create a state object of type FIFOQueue of size 24*60, and add to it the close of the current candle, then call the GetHighLow function to find the high and the low for the last 24*60 minutes.

And of course, to check if it is within 2% of the low in the 24 hr range you would check if   (Close-Low24)/(High24-Low24)<=0.02

If you don't think you can do it yourself, I'll throw it together and post it here.

 

Link to comment
Share on other sites

ok that would be great if you can...
Because only use about 2 - 3 indicators

This is what I am trying to create 2 scans:
1. EMA w/ MACD method
search for symbols where 1 candle before the EMA13 has crossed the EMA34 upwards and the MACD is above the 0.0 line and volume is 100,000 or more...

2. MFI and MACD method
scan for symbol where the MFI 80/20 is below the 20 line and the MACD hashes are red going to green or closed red going to open red and volume is 100,000 or more...

I have noticed also there are no unfiled hashes on the MACD, why? this is an important signal to show a weakening in momentum also...

Link to comment
Share on other sites

yes normally on the MACD hashes are 
green > filled green or red > filled red
the filled in hashes represent the momentum slowing down...
so what i need is when the MACD goes from red > filled in red and red to green
you can see an example of this if you go on https://cryptowat.ch/bitfinex/btcusd they show the different hashes on their charts. Binanace also has them too, this is very helpful for entry and exit points in a trade very high success rate of profiting.

Link to comment
Share on other sites

1. For daily high, use SymbolData.High,  for low SymbolData.Low
But how will I get the scanner to look for a new LOW or HIGH, won't I have to compare it to something please give example... thanks

2. Also if I want to only scan symbols with a certain volume which volume would i use the SymbolData.Volume???

Link to comment
Share on other sites

If you want specifically NEW low (and not just at the low), you can't do it in basic.

 
 
/// <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;
 
}

 

 

Link to comment
Share on other sites

hello is there a way to scan and check when a candle goes from red to green???

I am trying to find when a symbol dips down to its low points before it starts to go up...
I have so far, but this only catches the symbol at its lowest point. I am trying to catch it when it's going up so when the MACD > 0.0 also???
So how can I scan for these parameters and then show when MACD > 0 which usually comes after...

public void MainCalculation()
     { if (Volume_Bar > 500 && (RSI_Line <= 30 || MFI_Line <= 20) && EMA_Line13 < EMA_Line34)
          { SetColor("Buy NOW!", SysColor.Positive);
     SetScanResult("Buy NOW!");
return; } }

Edited by cryptonight
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...