Firetron’s InputSpreadOrder

1 173 Views No Comments 6 months ago
  • Creates a group of inputs for Firetron’s PlaceSpreadOrder.

    Custom Command Dependencies:
    Firetron’s GetAmountSpread
    Firetron’s GetPriceSpread
    Firetron’s InputAmountSpread
    Firetron’s InputOrderOptions
    Firetron’s InputPriceSpread

    Test Code:

    if not Load('done', false) then
      Log('Testing Alpha Spread Order')
      local alphaSpreadOrderOptions = CC_InputSpreadOrder('Alpha')
      local alphaOrderList = CC_PlaceSpreadOrder({listDynamic = alphaSpreadOrderOptions})
      for i = 1, #alphaOrderList do
        Log('Alpha Order ID: '..alphaOrderList[i])
      Log('Testing Beta Spread Order')
      local betaSpreadOrderOptions = CC_InputSpreadOrder('Beta')
      local betaOrderList = CC_PlaceSpreadOrder({listDynamic = betaSpreadOrderOptions})
      for i = 1, #betaOrderList do
        Log('Beta Order ID: '..betaOrderList[i])
      Save('done', true)
    • This topic was modified 5 months ago by Firetron. Reason: Renamed SpreadOrder to PlaceSpreadOrder
    • This topic was modified 4 months, 3 weeks ago by Firetron. Reason: Updated to rely on other input commands
    • This topic was modified 4 months, 2 weeks ago by Firetron. Reason: Hid price and amount inputs for order options
    • This topic was modified 4 months, 2 weeks ago by Firetron. Reason: Changed test script to do 2 spread orders
    HaasScript Code
    Sign in or Register to view
Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free