If I buy, I set a variable with ToDay(Time[0]).
My problem appears when I try to use this variabe in the next context.
Please find below an extract of my code:
[FONT=Courier New][SIZE=2][COLOR=black]// Condition set 1[/COLOR][/SIZE][/FONT] [COLOR=black][FONT=Courier New][SIZE=2]if[/SIZE][/FONT][FONT=Courier New][SIZE=2] (Low[[/SIZE][/FONT][FONT=Courier New][SIZE=2]0[/SIZE][/FONT][FONT=Courier New][SIZE=2]] < MIN(Low, [/SIZE][/FONT][FONT=Courier New][SIZE=2]20[/SIZE][/FONT][FONT=Courier New][SIZE=2])[[/SIZE][/FONT][FONT=Courier New][SIZE=2]1[/SIZE][/FONT][FONT=Courier New][SIZE=2]][/SIZE][/FONT][/COLOR] [SIZE=2][FONT=Courier New][COLOR=black]{[/COLOR][/FONT][/SIZE] [COLOR=royalblue][FONT=Courier New][SIZE=2]int[/SIZE][/FONT][FONT=Courier New][SIZE=2] Inday = ToDay(Time[[/SIZE][/FONT][FONT=Courier New][SIZE=2]0[/SIZE][/FONT][FONT=Courier New][SIZE=2]]);[/SIZE][/FONT][/COLOR] [COLOR=black][SIZE=2][FONT=Courier New]EnterLongStop([/FONT][/SIZE][FONT=Courier New][SIZE=2]);[/SIZE][/FONT][/COLOR] [SIZE=2][FONT=Courier New][COLOR=black]}[/COLOR][/FONT][/SIZE] [FONT=Courier New][SIZE=2][COLOR=black]// Condition set 2[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=black]if (Position.GetProfitLoss(Open[0], PerformanceUnit.Percent) > 0[/COLOR][/SIZE][/FONT] [SIZE=2][FONT=Courier New][COLOR=black]&& [COLOR=royalblue]ToDay(Time [0])> Inday[/COLOR])[/COLOR][/FONT][/SIZE] [SIZE=2][FONT=Courier New][COLOR=black]{[/COLOR][/FONT][/SIZE] [SIZE=2][FONT=Courier New][COLOR=black]ExitLong("", "");[/COLOR][/FONT][/SIZE] [SIZE=2][FONT=Courier New][COLOR=black]} [/COLOR][/FONT][/SIZE]
Thanks a lot!
Comment