Skip to content

Instantly share code, notes, and snippets.

Analyze the uploaded tradebook using FIFO matching and provide the following metrics only for realized/closed trades.

  1. Overall Metrics
  • Total trades
  • Winning trades
  • Losing trades
  • Win rate %
  • Loss rate %
  • Net realized P&L
//@version=5
indicator("Fixed Horizontal Support Levels", shorttitle="Fixed Supports", overlay=true)
// ==================== INPUT SETTINGS ====================
len_left = input.int(100, "Line Length Left", minval=10, maxval=500, group="Line Settings")
len_right = input.int(100, "Line Length Right", minval=10, maxval=500, group="Line Settings")
// -3% Level
color3 = input.color(color.new(color.red, 0), " -3% Line Color", group=" -3% Level")
thick3 = input.int(2, " -3% Line Thickness", minval=1, maxval=5, group=" -3% Level")
@rajvermacas
rajvermacas / skills.md
Last active February 22, 2026 08:19
codex

Disable 1. git worktrees 2. sub agent driven development 3. test driven development

@rajvermacas
rajvermacas / adr.pinescript
Created December 7, 2025 04:35
ADR Average Daily Range Pinescript
//@version=5
indicator("ADR Percentage", shorttitle="ADR%", overlay=false)
len = input.int(20, title="Length", minval=1)
tf = input.timeframe("1D", title="Timeframe")
threshold = input.float(5.0, title="Threshold %", minval=0.0)
adrPct = request.security(syminfo.tickerid, tf, 100 * (ta.sma(high / low, len) - 1))
plot(adrPct, title="ADR%", color=color.blue, linewidth=2)
@rajvermacas
rajvermacas / claude-summary.txt
Last active November 14, 2025 02:15
databricks model registration
Complete Summary: Deploying a Scikit-Learn Model on Databricks Model Serving
What We Accomplished
Successfully trained, registered, and deployed a scikit-learn Linear Regression model as a REST API endpoint on Databricks Model Serving.
Step-by-Step Process
1. Initial Setup & Understanding
Question: Can scikit-learn models trained on Databricks be served using Model Serving?
Answer: Yes! Databricks supports custom models packaged in MLflow format, including scikit-learn.
2. Reviewed Existing Notebook (PocML)
Cell 1: Basic model training
@rajvermacas
rajvermacas / AGENTS.MD
Last active October 23, 2025 22:08
gpt5
  • Keep the architecture lean, concise and simple.
  • Always keep a check on the number of lines in the file. If the file exceeds the limit of 800 lines, break it down into multiple files.
  • Always keep function within 100 lines of code and it should follow single responsibility principle
javascript:(function(){
if (!window._capturingLogs) {
window._capturingLogs = true;
window._logs = [];
const originalLog = console.log;
console.log = function(...args) {
window._logs.push(args.map(a => {
try { return JSON.parse(JSON.stringify(a)); } catch(e) { return String(a); }
}));
originalLog.apply(console, args);
@rajvermacas
rajvermacas / pastebin.txt
Last active October 12, 2025 04:55
pastebin
import os
from openai import OpenAI
# Setup client
client = OpenAI(
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/"
)
# Send a message to o3
@rajvermacas
rajvermacas / .wslconfig
Last active August 31, 2025 23:21
troubleshoot
# filepath="C:\Users\<username>\.wslconfig" - remove this line
[wsl2]
memory=16GB
@rajvermacas
rajvermacas / tmux.md
Last active August 21, 2025 22:56
tmux

Here are the essential tmux commands to get you started:

Starting and Managing Sessions

  • tmux - Start a new session
  • tmux new -s sessionname - Start a new named session
  • tmux ls - List all sessions
  • tmux attach -t sessionname - Attach to a session
  • tmux kill-session -t sessionname - Kill a session
  • tmux kill-server - Kill the tmux server