I'm working on coding a strategy and having trouble with the profit target. Also couldn't find any similar threads.
I'll use a made up up scenario for the sake of explaining. Let's say we enter a short trade when NQ is at 13,500.00 and the EMA is currently at 13,400.00. That would be a 400 tick difference.
How would I code such a scenario where I want to use that amount as the profit target or set the profit target as entry price minus indicator value like the example above? Or even a multiple like....1.5 times the difference between entry price and current EMA value like Entry(13,500) - EMA (13,400) = 400 ticks*1.5= 600tick profit target.
Thanks for any guidance. I've been trying to code this the following way to no avail....
SetProfitTarget(CalculationMode.Ticks, (Position.AveragePrice-EMA[0]*1.5);
Comment