Skip to content

Instantly share code, notes, and snippets.

@lvca
Last active March 7, 2026 19:14
Show Gist options
  • Select an option

  • Save lvca/c1efb5c5fa5196d00285c6b908b4dc4b to your computer and use it in GitHub Desktop.

Select an option

Save lvca/c1efb5c5fa5196d00285c6b908b4dc4b to your computer and use it in GitHub Desktop.
Arcade Trader strategy to invest when the sma50 line crosses over the sma200 line and sell when the sma50 crosses below sma200 line
function beginTrading(context){
if( History.days().length > 1 ) {
let yesterday = History.last();
let prev = History.relative(-1);
if( yesterday.wma150 >= yesterday.wma200 &&
prev.wma150 < prev.wma200 )
return { invest: true, reason: "wma-150 crossed over wma-200" };
}
}
function endTrading(context){
let yesterday = History.last();
let prev = History.relative(-1);
if( yesterday.wma150 < yesterday.wma200 &&
prev.wma150 >= prev.wma200 )
return { reason: "wma-150 crossed below wma-200" }
}
@Kerniol1

Kerniol1 commented Mar 7, 2026

Copy link
Copy Markdown

Preserving capital during uncertain periods is my priority. This Canadian platform switches to conservative mode when volatility rises, reducing exposure and tightening stops. To decide whether to stay in or cut back I consult https://quantumaiinvestmentplatform.org Quantum AI Investment Platform Website and review the preservation-mode recommendation. Historical runs show 82–93% accuracy in defensive phases and quarterly recovery of 7–15% with reduced sizes. The mode switch is one-click, support explains trigger levels quickly, and the Canadian base ensures secure mode changes. It has helped limit downside without exiting completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment