Jump to content
Medved Trader Forums

Scan for pivot cross


Recommended Posts

Hello Jerry,

I have created an SCAN when the price crosses or is equal to an annual pivot, but how is it done so that it is limited only to the day it is activated, because it is returning the result of previous days.

Thanks

Mariano

sorry I realized after the post that was for the SCAN section of the forum.

Edited by mca12345
wrong section
Link to comment
Share on other sites

if (Close.CrossesUp(CamarillaPivotsHist_H3(Y), 0))  {   SetColorAndShape("R3", PBShape.TriangleUp, SysColor.MainIndicator1);   TriggerAlert("R3 CAMARILLA", @"R3 CAMARILLA");   SetScanResult("S3 CAMARILLA");   return;  }
if (Close.CrossesDown(CamarillaPivotsHist_L3(Y), 0))  {   SetColorAndShape("S3", PBShape.TriangleDown_Hollow, SysColor.MainIndicator1);   TriggerAlert("S3 CAMARILLA", @"S3 CAMARILLA");   SetScanResult("S3 CAMARILLA");   return;  }
if (Close.CrossesUp(DeMarkPivotsHist_High(Y), 0))  {   TriggerAlert("DEMARK R1", @"DEMARK R1");   SetScanResult("DEMARK R1");   return;  }
if (Close.CrossesDown(DeMarkPivotsHist_Low(Y), 0))  {   TriggerAlert("DEMARK S1", @"DEMARK S1");   SetScanResult("DEMARK S1");   return;  }
if (Close.CrossesUp(PivotPointsHist_R1(Y), 0))  {   TriggerAlert("PIVOT R1", @"PIVOT R1");   SetScanResult("PIVOT R1");   return;  }
if (Close.CrossesUp(PivotPointsHist_R2(Y), 0))  {   TriggerAlert("PIVOT R2", @"PIVOT R2");   SetScanResult("PIVOT R2");   return;  }
if (Close.CrossesDown(PivotPointsHist_S2(Y), 0))  {   TriggerAlert("PIVOT S2", @"PIVOT S2");   SetScanResult("PIVOT S2");   return;  }
if (Close.CrossesDown(PivotPointsHist_S1(Y), 0))  {   TriggerAlert("PIVOT S1", @"PIVOT S1");   SetScanResult("PIVOT S1");   return;  }
 

Shows old cross, not current DAY, yes on historical charts.

Link to comment
Share on other sites

ok, when doing the scan, you select HISTORICAL on the Scanner tab, right? 

and you do have Auto Backfill checked?

Scan works on the last candle on the historical chart. It really can't trigger on previous days. Only thing I can think of is if the data is not backfilled. Note that you can add the Paintbar indicator to the historical chart and see where the triggers are. If it occurs on the most current candle, then it would trigger the scan too. can you check to make sure?

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...