Skip to main content
Home / NinjaTrader 8 / PFX Perps Bridge
NinjaTrader 8 · Add-on · Free · v1.04

NinjaTrader 8 to MyFundedPerps.Your strategy. Your perps account.

Run a NinjaTrader 8 strategy on a BTC or ETH chart. When it signals, the bridge places the trade on your own MyFundedPerps account through its API, with the stop and target attached, and keeps managing it. While it is on, NinjaTrader's own account takes no order.

Start in DryRun: it reads your account and prints the exact order it would send, and sends nothing.

✓Free, source included✓DryRun first✓Your key stays on your PC✓BTC and ETH
NinjaScript Output · PFX Perps Check · BTCUSDDryRun
NINJASCRIPT OUTPUT
PFX PERPS CHECK 1.00 (bridge 1.04) - DryRun ONLY: it cannot send an order.
PFX PERPS [Check] BRIDGE DRYRUN - 0.001 BTC / 0.01 ETH, leverage 2, account the single active one, API key found
PFX PERPS CHECK - example LONG from the chart price 96,240.50: stop 95,278.10 (1%), target 98,165.31 (2%)
PFX PERPS [Check] pfx-check-btc-…-l DryRun - DRY RUN - would send {"side":"buy","type":"market","size":0.001, "attached_stop_loss_price":…, "attached_take_profit_price":…}
PFX PERPS CHECK - PASSED: the key worked, the account, market and live quote were read. NOTHING was sent.

Example output · prices and sizes are illustrations

Three modes

Off. DryRun. Live.You choose when it trades.

The mode is a setting in the strategy. The strategy prints its mode every time you switch it on, so you always know which one is running.

Off · the default

Nothing changes

The strategy trades its NinjaTrader account as normal. Every PFX strategy ships with the bridge Off.

DryRun · start here

Watch, send nothing

On each signal it reads your MyFundedPerps account, the market, your open positions and the live price, then prints the exact order it would send.

Live · real orders

Your perps account trades

The order goes to MyFundedPerps with its stop and target. NinjaTrader's own account takes no order.

Your API key

One file on your PC.Sent only to MyFundedPerps.

The bridge needs your MyFundedPerps API key. This is exactly where it lives and where it goes.

Where it is kept
  • In one plain text file: Documents\NinjaTrader 8\PFX\perps_api_key.txt, holding only the key
  • Sent only to MyFundedPerps (developers.myfundedperpetuals.com), in the request header, over HTTPS
  • The Output window only ever says API key found or MISSING
  • Delete the file and the bridge sends nothing
Good to know
  • It is never sent to PrecisionFX: we never see it
  • It is not encrypted: anything that can open files in your Windows account can read it
  • If OneDrive or Dropbox syncs your Documents folder, the file is synced too
  • Think someone has seen it? Revoke it at MyFundedPerps and make a new one
Built to be careful

It will.It will never.

It will
  • Send only from live bars: a backtest never sends anything
  • Attach the stop and target to every entry
  • Move the stop when the strategy does, and confirm it by reading it back
  • Retry a close until MyFundedPerps shows you flat
It will never
  • Send anything in Off or DryRun
  • Take over a position that was already open
  • Loosen a stop
  • Place the same signal twice after a network retry

Your chart and the perp trade at slightly different prices, so the stop and target are sent as distances from the perp's live price: a 300-point stop on the chart is a 300-point stop on the perp.

Install

DryRun in minutes.Four steps.

1

Copy two files

PFX_PerpsBridge.cs into bin\Custom\AddOns, PFX_PerpsCheck.cs into bin\Custom\Strategies.

2

Compile

NinjaScript Editor → F5. No red errors means it is installed.

3

Save your key

Only the key, in Documents\NinjaTrader 8\PFX\perps_api_key.txt.

4

Run the check

Add PFX Perps Check to a BTCUSD chart. It prints the order it would send, then PASSED.

New to this? Follow the step-by-step guide →

!

Live mode places real orders

In Live the bridge trades your own MyFundedPerps account. Crypto perps move fast, around the clock, and leverage magnifies losses. Use DryRun until it does what you expect, then Live at the smallest size (0.001 BTC or 0.01 ETH). Your account's own rules, such as daily loss and drawdown limits, still apply.

Questions

Good to know.

Is it really free?

Yes, with the source included. No subscription, no paid tier.

Does it place real orders?

Only in Live mode, and only on your own MyFundedPerps account. In DryRun it reads your account and prints the order it would send, and sends nothing. Every PFX strategy ships with the bridge Off.

Where is my API key kept?

In one plain text file on your PC: Documents\NinjaTrader 8\PFX\perps_api_key.txt. The bridge sends it only to MyFundedPerps, in the request header over HTTPS. It is never printed, logged, put in a web address or sent to PrecisionFX.

Which markets does it trade?

BTC and ETH. The strategy runs on a BTCUSD or ETHUSD chart in NinjaTrader (for example Coinbase), and the bridge trades the matching perp on MyFundedPerps. Any other chart is skipped with a message.

Which strategies can use it?

PFX strategies for NinjaTrader 8 have a Perps bridge setting group, Off by default; they are released one at a time after testing. NinjaScript developers can also call the bridge from their own strategy: the source is included.

Does NinjaTrader need to stay open?

Yes, for new trades and for managing them. If NinjaTrader closes, an open position keeps its stop and target at MyFundedPerps, but the bridge stops moving the stop for that trade.

Free download · v1.04

DryRun first.Then your call.

Runs onMarket data

Risk warning: Crypto perpetual futures are high risk. Prices move fast, around the clock, and leverage magnifies losses: you can lose your whole account balance. In Live mode PFX Perps Bridge places real orders on your own MyFundedPerps account. PrecisionFX is not affiliated with MyFundedPerps, and nothing here is financial advice. Read the full risk disclosure.