As I understand, setStop is defined on void Initialized(), therefore befora OnBarUptade (where I define close1).
How can I handle to set something like below structure? (Is it possible to define close1 on Initialize()?)
if close1>X
set stopLossNumber =y
else
set stopLossNumber =z
SetStopLoss("", CalculationMode.Percent, stopLossNumber, false);
SetProfitTarget("", CalculationMode.Percent, stopGainNumber);
I ve tried the strategy below but it did not work,, Any clue?
Does Realtimestrades considers only the open position? or all positions of the day?
How can I control an isolated position?
if (Performance.RealtimeTrades.TradesPerformance.Perc ent.CumProfit < - stopLevelMovel)
{
ExitLong("stoptest");
}

Comment