why this code doesn't work???

Created at 18 Nov 2018, 14:13
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
FR

fringou.bfe

Joined 17.11.2018

why this code doesn't work???
18 Nov 2018, 14:13


var currentHours2 = Server.Time.TimeOfDay.Hours;
            if (currentHours2 >= StopTime)
                //stoptime in hours = 18//
                ClosePosition(longPosition, Quantity);
            if (currentHours2 >= StopTime)
                ClosePosition(shortPosition, Quantity);

 


@fringou.bfe
Replies

PanagiotisCharalampous
19 Nov 2018, 12:32

Hi fringou.bfe,

Can you explain what do you mean when you say it doesn't work? Do you get any error messages? Can you share the full cBot code?

Best Regards,

Panagiotis


@PanagiotisCharalampous

fringou.bfe
19 Nov 2018, 14:28

problème résolue dans un autre post

mon probleme est resolu dans un autre poqst, merci


@fringou.bfe