Forum

Need help identifying last BUY and last SELL order ticket

Hello! I want to identify both last BUY and SELL order ticket to calculate their current profit and add more positions after X profit. I have tried several ways but I don't know why it's not working. I have tried printing the ticket variable out but the ticket number is always 0 Here is what I have

Need help coding the Average of MA difference, can't get it to work properly

So I want to code the Moving Average of TDI's MA difference and I'm at my wit's end right now. This is my code //----- Global Variables double gdaRSI[] ; double gdaRSI_Green[] ; double gdaRSI_Red[] ; double TDI_MA[] ; double RSI_MA_Diff[] ; double MA_of_MA_Diff[]; double