Bullish today, TQQQ opened at $61.52 closed at $62.57! Got out with $60 profit, please find below the trades for the day (only the last few are shown):

Traded TQQQ with 1 sec bars/candles applying MACD Histogram logic. Again we tried refining the sell logic by setting the limit price as Avgentryprice + (Avgentryprice * ProfitPercent)). Earlier we were trying to use the Close from previous bar but those were not triggering.
[IntrabarOrderGeneration = false]
inputs:
SellSetProfitTargetTrue( 0 ) [DisplayName = "SetSetProfitTargetTrue", ToolTip =
"Enter SetPercentTrailing for selling setting."],
AvgentrypriceTrue( 1 ) [DisplayName = "AvgentrypriceTrue", ToolTip =
"Enter Avgentryprice = 1 else Close."],
ProfitPercent( 0.002 ) [DisplayName = "ProfitPercent", ToolTip =
"Enter Profit Percent."],
ProfitCents ( 0 ) [DisplayName = "ProfitCents", ToolTip =
"Enter Profit per share."],
SellTimeCondition( Time > 0929 and Time <= 1600 ) [DisplayName = "SellTimeCondition", ToolTip =
"Enter selling time condition if day trading."],
FastLength( 12 ) [DisplayName = "FastLength", ToolTip =
"Enter number of bars to use in calculation of shorter length moving average."],
SlowLength( 26 ) [DisplayName = "SlowLength", ToolTip =
"Enter number of bars to use in calculation of longer length moving average."],
MACDLength( 9 ) [DisplayName = "MACDLength", ToolTip =
"Moving Average Convergence Divergence Length. Enter the number of bars to use in smoothing the MACD value."];
variables:
MyMACD( 0 ),
MACDAvg( 0 ),
MACDDiff( 0 ),
Dummy( 0 );
MyMACD = MACD( Close, FastLength, SlowLength );
MACDAvg = XAverage( MyMACD, MACDLength );
MACDDiff = MyMACD - MACDAvg;
if Marketposition > 0 and Avgentryprice < Close and SellTimeCondition {and Currentcontracts > 1} then Begin
Print("SELL Symbol: ", Symbol, " Time: ", Time, " NetProfit: ", NetProfit, " GrossProfit: ", GrossProfit, " GrossLoss: ", GrossLoss, " OpenPositionProfit: ", OpenPositionProfit, " Avgentryprice: ", Avgentryprice, " Currentcontracts: ", Currentcontracts);
if SellSetProfitTargetTrue = 1 Then Begin
if ProfitCents > 0 Then Begin
SetStopShare;
Setprofittarget(ProfitCents);
end
Else Begin
SetStopShare;
Setprofittarget(Avgentryprice * ProfitPercent);
End;
End
Else Begin
//If C >= O Then
If MACDDiff[1] < MACDDiff Then
Dummy = C
Else Begin
if AvgentrypriceTrue <> 1 Then
//Sell all shares next bar at Close Limit
Sell all shares next bar at (Avgentryprice + (Avgentryprice * ProfitPercent)) Limit
//Sell all shares next bar at Market
Else Begin
if ProfitCents > 0 Then
Sell all shares next bar at (Avgentryprice + ProfitCents) Limit
Else
Sell all shares next bar at (Avgentryprice + (Avgentryprice * ProfitPercent)) Limit;
End;
End;
End;
End;