How do I implement and test an Algo from ADL on TT?

Hi,

I’ve seen a few post here regarding ADL and algos on TT, so I wanted to give it a shot myself. I believe I have just created a working algo, but i’m not sure where to go from here.

Is there anyway to test the algo I just created? Once i’ve tested it, how do a bring it over to TT desktop to use for my trading?

@Lesuj

Great question!

So to test out your algos I would suggest to open up TT Desktop in a simulation enviroment and then open up the MD Trader(DOM) widget on a second window or monitor with the instrument specified in your algo. I would also suggest to open up an Audit Trail widget to watch the record of your algo’s activity.

The first test of your entry order logic is to make sure the algo correctly submits orders into the market with the default values specified in your algo. You will launch the algo in ADL and watch as it enters the market in MD Trader; you will also look for confirmation in the messages recorded in the Audit Trail.

To play the algo:

  1. In ADL, select the Instrument block to verify that the selected Account matches the active account in MD Trader.

  1. In the ADL menu bar, click the Play button to start the algo.

  2. Verify that the algo submitted the entry order at the Best Bid and that the order is working the correct quantity.

  1. The wrk qty output port of the Entry Order block shows 5 (the default Entry Order Qty value).

  2. MD Trader shows a working order with a quantity of 5.

  3. The Audit Trail shows that the algo placed an order at the Best Bid and then was repriced when the market moved.

  4. In the ADL menu bar, click the Play button to stop and reset the algo. Note : When you stop an algo, the working order is automatically canceled.

Awesome TY!!!

I got mine to start working! :grinning::grin::blush:

But let me ask you, what if I want to put more than 1 lot at a time? It looks like right now I am stuck at 1 order qty per entry. Is there a way for me to change this?

@Lesuj

Ok so basically you need to now test your user defined variables. If the rest of your algo is working then this shouldn’t be a problem, but we’ll need to alter a few settings.

You will change the Entry Order Qty to a non-default value before starting the algo. Then you will verify that changing the quantity while the algo is running also changes the working order quantity in the market.

To test your user-defined order quantity:

  1. Make sure your algo is stopped; click |> if necessary.
  2. In the Information Panel, click the Variables tab to display the variables used by your algo.

  1. In the Variables tab, click the Value field for the Entry Order Qty block; then enter a different value and click Apply . You should choose a value large enough that it is unlikely to be fully-filled quickly. This example will use 100.

  1. In the ADL menu bar, click the play button to start the algo.
  2. Verify that the algo submitted the entry order at the Best Bid and that the order is working the correct quantity.

  1. The wrk qty output port of the Entry Order block shows 100.

  2. MD Trader shows the order working a quantity of 100.

  3. The Audit Trail shows that the algo placed an order at the Best Bid.

  4. While the algo is still running, change the Entry Order Qty to a lower value and click Apply .

  1. Verify that the algo changed the order quantity to the new value.

  1. The wrk qty output port of the Entry Order block shows the new value (not the default Entry Order Qty value).
  2. MD Trader shows the new order working a quantity (50, in this case).

8.Click |> to stop the algo and cancel the working order.

If everything seems to be working fine at this point, you are ready to update your algo to capture the price and qauntity data as fills occur for your entry order.

@FimeJB @Lesuj

You guys have been so helpful. Thanks for the detailed write-ups.

@Hotazo

Agreed thx all