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('==================================================')
      Log('Testing Alpha Spread Order')
      Log('==================================================')
    
      local alphaSpreadOrderOptions = CC_InputSpreadOrder('Alpha')
    
      local alphaOrderList = CC_PlaceSpreadOrder({listDynamic = alphaSpreadOrderOptions})
    
      for i = 1, #alphaOrderList do
    
        Log('Alpha Order ID: '..alphaOrderList[i])
    
      end
    
      Log('==================================================')
      Log('Testing Beta Spread Order')
      Log('==================================================')
    
      local betaSpreadOrderOptions = CC_InputSpreadOrder('Beta')
    
      local betaOrderList = CC_PlaceSpreadOrder({listDynamic = betaSpreadOrderOptions})
    
      for i = 1, #betaOrderList do
    
        Log('Beta Order ID: '..betaOrderList[i])
    
      end
    
      Save('done', true)
    
    end
    • 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