Jump to content

jokajon00

Members+
  • Content Count

    4
  • Joined

  • Last visited

Posts posted by jokajon00


  1. 3 hours ago, Day-Meister said:

    OK, Try this for long:

    
    CXL ALLSYMB; StopPrice=Price-0.01;DefShare=BP*0.5;Share=DefShare*0.333*Price*0.01;Price=Ask-Price+0.01;SShare=Share/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;Share=Share/4;Share=Share*4;TogSShare;ROUTE=SMRTL;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=1000;
    Price=Ask-StopPrice*1.5 +Ask;TriggerOrder=RT:SMRTL; Price=Round2; PX:Price ACT:SELL QTY:POS*.25 TIF:DAY+;
    Price=Ask-StopPrice*2+Ask;TriggerOrder=RT:SMRTL PX:Price ACT:SELL QTY:POS*.25 TIF:DAY+;
    Price=Ask-StopPrice*3+Ask;TriggerOrder=RT:SMRTL PX:Price ACT:SELL QTY:POS*.25 TIF:DAY+;
    Price=Ask-StopPrice*4+Ask;TriggerOrder=RT:SMRTL PX:Price ACT:SELL QTY:POS*.25 TIF:DAY+;
    TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

    and this for short:

    
    CXL ALLSYMB; StopPrice=Price+0.01;DefShare=BP*0.5;Share=DefShare*0.333*Price*0.01;Price=Price-Bid+0.01;SShare=Share/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;Share=Share/4;Share=Share*4;TogSShare;ROUTE=SMRTL;Price= bid-0.05;TIF=DAY+;SELL=Send;DefShare=1000;
    Price=StopPrice-Bid*1.5;Price=Bid-Price; Price=Round2;TriggerOrder=RT:SMRTL PX:Price ACT:BUY QTY:POS*.25 TIF:DAY+;
    Price=StopPrice-Bid*2;Price=Bid-Price; TriggerOrder=RT:SMRTL PX:Price ACT:BUY QTY:POS*.25 TIF:DAY+;
    Price=StopPrice-Bid*3;Price=Bid-Price; TriggerOrder=RT:SMRTL PX:Price ACT:BUY QTY:POS*.25 TIF:DAY+;
    Price=StopPrice-Bid*4;Price=Bid-Price; TriggerOrder=RT:SMRTL PX:Price ACT:BUY QTY:POS*.25 TIF:DAY+;
    TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.3 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

    That is for sizing based on BP

    Replace the first line of each with the corresponding code for $fixed risk from above.

    In testing, I noticed that sometimes it would only create 3 orders (I suspect it has something to do with calculation of the 1.5R) (EDIT: pretty sure that was the issue; corrected script with ROUND2 to hopefully fix that)

    @Day-Meister Thanks so much! This is awesome; tested it in simulator. I adjusted it for $Fixed risk and also other Rs (just need the orders in and then I can slide em where I need on the chart) it seems to work. Just want to make sure its right or if anyone else needs it that its here This is for a short entry with a $20 Risk. I changed routes to my preferred routes and also because my broker doesn't use SMRTL (ILIMIT is what they use and I've seen some brokers use in Kyles excel file). Here's what I've got:

     

    CXL ALLSYMB; StopPrice=Price+0.01;DefShare=BP*0.5;Price=Price-Bid+0.01;SShare=20/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;Share=Share/4;Share=Share*4;TogSShare;ROUTE=LIMIT;Price= bid-0.05;TIF=DAY+;SELL=Send;DefShare=1000;
    Price=StopPrice-Bid*2;Price=Bid-Price; TriggerOrder=RT:NSDQL PX:Price ACT:BUY QTY:POS*.25 TIF:DAY+;
    Price=StopPrice-Bid*3;Price=Bid-Price; TriggerOrder=RT:NSDQL PX:Price ACT:BUY QTY:POS*.25 TIF:DAY+;
    Price=StopPrice-Bid*4;Price=Bid-Price; TriggerOrder=RT:NSDQL PX:Price ACT:BUY QTY:POS*.25 TIF:DAY+;
    Price=StopPrice-Bid*5;Price=Bid-Price; TriggerOrder=RT:NSDQL PX:Price ACT:BUY QTY:POS*.25 TIF:DAY+;
    TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.3 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;
    

    And for SSR gets changed to: ROUTE=LIMIT;Price= bid+0.01;TIF=DAY+;SELL=Send;DefShare=1000;

     

    And Long will be:

    CXL ALLSYMB; StopPrice=Price-0.01;DefShare=BP*0.5;Price=Ask-Price+0.01;SShare=20/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;Share=Share/4;Share=Share*4;TogSShare;ROUTE=LIMIT;Price= Ask+0.03;TIF=DAY+;BUY=Send;DefShare=1000
    Price=Ask-StopPrice*2+Ask;TriggerOrder=RT:NSDQL PX:Price ACT:SELL QTY:POS*.25 TIF:DAY+;
    Price=Ask-StopPrice*3+Ask;TriggerOrder=RT:NSDQL PX:Price ACT:SELL QTY:POS*.25 TIF:DAY+;
    Price=Ask-StopPrice*4+Ask;TriggerOrder=RT:NSDQL PX:Price ACT:SELL QTY:POS*.25 TIF:DAY+;
    Price=Ask-StopPrice*5+Ask;TriggerOrder=RT:NSDQL PX:Price ACT:SELL QTY:POS*.25 TIF:DAY+;
    TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

    This is definitely a life saver. Work smarter, not harder! Thanks again!


  2. 7 minutes ago, Day-Meister said:

    It sounds simple in theory, and you could adjust the code to create the initial orders that way by making them 4 different limit orders and 1 stop order (rather than the multiple range orders); The problem comes when your limit orders are hit, there is no way to really change the quantity of your stop order automatically. I can't think of a way to overcome that, sorry.

    @Day-Meister Yeh. I just cant figure out the code for 4 limit orders and 1 stop order to be triggered after entry . I will be at the trade desk so don't need the stop to change automatically. Once a limit order hits I can just load the Stop Order into the montage by double clicking it, then click P to change to current position size and then click RPL to replace and change it. If you could post the code for 4 covers and 1 stop order that'd be awesome.

     

    Thanks again.


  3. On 2/8/2022 at 10:05 AM, Day-Meister said:

    OK,

    This should give you $50 long risk:

    and $50 short risk

     

    Obviously test in SIM extensively before counting on it 🙂

    Let me know how it goes

    Awesome this works great. @Day-Meister Is there a way to adjust code so there is 1 stop order for the entire position and 4 cover or sell orders for 25% each at 1.5R, 2R, 3R, 4R?

    Just want to see if I can get some ECN rebates haha ROUTE would be NSDQL or smart limit.

    Thanks a million!


  4. So I have seen a lot of hotkey setups on here which are very cool. I plan on using one that you can set your risk and it sets 3 range orders, but it requires entering the trade via hotkey and then triggers the range orders. I was wondering how to create a hotkey that creates 4 range orders with the stop of all set as the area i click on the chart and gets loaded into price. I've tried 2 different ways but every time only one order gets sent.. I'll post both ways and if someone could help that would be great.

    Thanks

    PS. These are to cover short.

    Attempt 1:

    ROUTE=STOP;StopType=Range;LowPrice=AvgCost-0.25 ;HighPrice=price ;Share=Pos*0.25 ;TIF=DAY+;BUY=Send;
    ROUTE=STOP;StopType=Range;LowPrice=AvgCost-0.45 ;HighPrice=price ;Share=Pos*0.25 ;TIF=DAY+;BUY=Send
    ROUTE=STOP;StopType=Range;LowPrice=AvgCost-0.65 ;HighPrice=price ;Share=Pos*0.25 ;TIF=DAY+;BUY=Send
    ROUTE=STOP;StopType=Range;LowPrice=AvgCost-0.75 ;HighPrice=price ;Share=Pos*0.25 ;TIF=DAY+;BUY=Send

    Attempt 2:

    ROUTE=STOP;StopType=Range;LowPrice=AvgCost-0.25 ;HighPrice=price ;Share=Pos*0.25 ;TIF=DAY+;BUY=Send;
    TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:AvgCost-0.45 HighPrice:Price ACT:BUY QTY:POS*0.25 TIF:DAY+;
    TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:AvgCost-0.65 HighPrice:Price ACT:BUY QTY:POS*0.25 TIF:DAY+;
    TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:AvgCost-0.75 HighPrice:Price ACT:BUY QTY:POS*0.25 TIF:DAY+;
     

     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.