AbzParticipant
Veteran
Hello,
im trying to write a code that could enter on specific date , month and year and then exit on antother specific date . Below is an example of entry and exit.
i have 30 – 40 different entry and exit dates i want to backtest on different stocks.
Entry Exit
05.07.2013 08.10.2013
thanks
Can’t you select the date/time range in the backtest dialog box?
Hard coding dates in the code would make it more difficult for you to later change them, wouldn’t it?
AbzParticipant
Veteran
I want to test single dates on multiple shares. I thought then if it is possible to specify the date, I do not manually need to adjust the date on each stock
There you go (you will replace dotted lines with your code and set your own conditions), but I still think using a watchlist next to the backtest dialog box would do way better:
ONCE StartDate = 20130705
ONCE EndDate = 20131008
TradingON = (date >= StartDate) AND (date <= EndDate)
.
.
IF Your_Conditions AND TradingON THEN
BUY/SELLSHORT......
ENDIF
.
.
AbzParticipant
Veteran
exactly what i needed. thanks robertogozzi
Hi guys,
Can you please help me, I would like to be able to enter trades manually and then simply have a code or system that will close automatically for me all trades at a specific time, for example end of the day, or a certain time..
Please let me know I can’t find a way to do this with deals opened manually..
Thanks
Ivan
It’s not possible for any automatic strategy to know about trades opened manually or by other strategies.
You can only manually close trades opened by any automatic strategy, but that strategy will be immediately stopped.
You can only manually close trades opened by any automatic strategy, but that strategy will be immediately stopped.
Ehh …
You can only stop automatic strategies, and depending on parameter settings the position will immediately be closed, or left open for you to deal with manually.
Hi Roberto, I am Italian like you but I write in English so everyone can read us too..
I formally requested Prorealtime to add the possibility to “close all trades” at a specific time or date and time even for the deals opened manually.
The reason behind my request is that I am finding hard to close the losing deals and I let them run for days and days until they become a big loss, eating all my profits.
At the end this is a rule very commonly used by day traders ” to close all positions when trading session closes” to prevent indeed having any open deal becoming a big loss overnight or due to gapping at next open..
I know we have Stop losses, but I prefer to trade with no stop loss and then just close all deals at the end of the day… I just can’t do it I suppose due to emotional trading (it’s hard to manually close losing deals!) So I would be happy to have this option in the system that does it automatically for me, for all my deals..
I understand. Only PRT can be of help by adding an option to close a trade at a given time, in any case or only if losing at that time. I hope they adhere to your request sometime in the next months/years.
Hi Roberto,
I hope too because looking at my day trading stats, if I would have “all my losing deals” closed at the end of each day for example I would be consistently in profit and this is because my % win rate is quite higher than the losers.
I just have to stick to the rule to cut the losers short and for this I need a system to do it for me 🙂
I will update you if they let me know.
Thanks