Does this simple EL code work in TradeStation?

Discussion in 'Strategy Building' started by Rocket130713, Jun 17, 2021.

  1. Hello, wanted to reach out and ask if the EL code below prints out the number 7 in the TS platform print log? If it does in fact print out the number 7 then the code works as I need it to, then I will sign up with TS and use their platform for backtesting. Really appreciate it if someone could test the code below on their machine to see if it prints out the number 7 in the TradeStation print log, or maybe it does not work due to incorrect syntax. Here is the EL code that I need someone to test on their machine - thank you in advance for any help:

    [IntrabarOrderGeneration = TRUE]

    variables:

    intrabarpersist AD_Max_Pos_Acc_1(0),
    intrabarpersist AD_Max_Pos_Acc_1_S(""),
    intrabarpersist AD_Get_Pos_Acc_1(0),
    intrabarpersist AD_Get_Pos_Acc_1_S(""),
    intrabarpersist Count(0),
    intrabarpersist Count_S(""),
    intrabarpersist Lots(0);

    AD_Max_Pos_Acc_1 = 13 ;

    AD_Max_Pos_Acc_1_S = NumToStr(AD_Max_Pos_Acc_1,0);

    AD_Get_Pos_Acc_1 = 6 ;

    AD_Get_Pos_Acc_1_S = NumToStr(AD_Get_Pos_Acc_1,0);

    Count = 1 ;

    Count_S = NumToStr(Count,0) ;

    Lots = StrToNum("AD_Max_Pos_Acc_" + Count_S + "_S") - StrToNum("AD_Get_Pos_Acc_" + Count_S + "_S") ;

    Print("Lots = ",Lots) ; // Question: Does this Print statement print out the number 7 ?​
     
    Last edited: Jun 17, 2021
  2. Verifies, Prints 0.
     
  3. Shax

    Shax