Zorro-Project Fair Value Gap/FVG Script

Zorro FVG

Hello Friend


// sleep FVG ///////////////////
#include <profile.c>
#include <stdio.h>

#define FVG_len 20
#define FVG_min 0.0025
#define FVG_plotHL false
#define FVG_plot true

typedef struct {
  int tf;       // Timeframe in min, e.g 240 (4H)
  bool bullish; // False = bearish
  double start;
  double half;
  double end;
  int expires; // How many bars FVG is valid for
               // struct FVG* child; // Pointer to another FVG struct
} FVG;

FVG *FVGs[1024];

function plotline(string n, double Price, int left, int right, int col) {
  plotGraph(n, left, Price, LINE, col); // FVG Start
  plotGraph(n, right, Price, LINE | END, col);

double FVG_compute(FVG fvg) {
  char n[32];
  var col = GREEN;
  if (!fvg.bullish) { // Bearish FVG
    sprintf(n, "%-dm", fvg.tf);
    col = RED;
  } else
    sprintf(n, "+%dm", fvg.tf);
  double half =
      fvg.start + (fvg.end - fvg.start) / fix0(2); // Avoid zero division

  if (FVG_plotHL) {

    plotline(n, fvg.start, 2, -FVG_len, BLACK); // FVG Start
    plotline(n, fvg.end, 0, -FVG_len, BLACK);   // FVG End

  sprintf(n, " HALF", fvg.tf);

  plotline(n, half, 1, -FVG_len, col); // FVG Start

  return half;

function run() {
  // BarPeriod = 240; // 4H
  Hedge = 2;             // Allow hedging
  set(LOGFILE, PLOTNOW); // log all trades
  StartDate = 20200101;
  // EndDate = 20150101;
  Verbose = 2;
  LookBack = 3; // Needed for FVG
  Capital = 100000;
  EntryTime = FVG_len;
  Risk = 1000;

  // vars HT_FVG = series(price),1440) //for later, going to implement MTF
  // FVG's. - sleep

  if (priceC(1) > priceO(1)) { // Bullish FVG
    if (priceL(0) >= priceH(2) + FVG_min) {

      FVG fvg;
      fvg.tf = BarPeriod;
      fvg.bullish = true;
      fvg.start = priceH(2);
      fvg.end = priceL(0);
      fvg.expires = FVG_len;

      FVGs[0] = &fvg;

      printf("\n%d\n", FVGs[0]->start);

      Entry = FVG_compute(fvg) - priceC(0);
      Stop = priceL(1);
      TakeProfit = 0.01;
  } else if (priceH(0) + FVG_min <= priceL(2)) { // Bearish FVG

    FVG fvg;
    fvg.tf = BarPeriod;
    fvg.bullish = false;
    fvg.start = priceL(2);
    fvg.end = priceH(0);
    fvg.expires = FVG_len;

    FVGs[0] = &fvg;

    printf("\n%d\n", FVGs[0]->start);

    Entry = priceC(0) - FVG_compute(fvg);
    Stop = priceH(1);
    TakeProfit = 0.01;

function main() {

  // vars FVGs[1000]

interview with a freetard

interview with a freetard

Interview with Citizen #8213712

🧭 Navigation

Q: How does your workflow look like? Specifically in terms of management. What tools and services do you use?

💻 Unlike my interviewer, i use software for everything. Pen and paper is inefficient in terms of speed and also when it comes to storage and organization.

📁 Keeping everything close with folder structures allows me to quickly navigate from year to year, topic to topic, project to project etc.

🛈 Markdown is my format of choice as it’s vercetile and simple to use. It can be converted into other formats, such as blogpost, slideshow, pdf, etc…

🌐 I use LIBRE software and work with files directly instead of relying on “solutions” such as notion, word, evernote etc…


This way you will own everything and remain independent.

Can you read your E-Mail without internet access? probably not -

But at least you’re happy.

⚙ Navigation

🗒️ Infobase (The core)


  • for managing projects, notes, todolists etc…

  • A systemwide CAPS + N keypress will open the index page (index.md)

  • Markdown files can link to other .md files, which creates a tree. This makes everything very convenient and organized

  • TAB ENTER BACKSPACE to navigate between links

vimwiki folder structure

⌛ Todo’s


  • TaskWarrior can be implemented into VimWiki with the taskwiki vim plugin.
task add dosomething project:projectname +dev +othertags

adds a task entry called dosomething in “projectname” with the “dev” tag

  • tags come in handy because now you can display “+dev” tasks in dev.md which will give you an overview of ALL your dev projects and their corresponding todos in one file.



VimWiki Index -> memes -> [ subject ] => $ sxiv *


(sxiv is a lightweight image viewer. mpv is the same, but for videos)

Setup guide