LeonParticipant
Junior
Hello,
i don’t want the system to hold positions over night and i found this code:
DEFPARAM FlatAfter = HHMMSS
for exammple:
DEFPARAM FlatAfter = 200000
but how to make sure that it will start again tomorrow morning at 08:00 o clock?
Another point i am thinking of:
Is there a possibility to code that the system shall just trade till max. 1,000.00€ lost under start budget ?
I want to make sure that it wont use all of the money that is available.
Appreciate every help here!
Best Regards
Leon
Use flatbefore and flatafter. It will only trade between those hours. Regarding your second question, I’m not sure what you mean? Is it stop loss you are talking about? If yes then: Set stop $loss 1000
Hope it helps.
LeonParticipant
Junior
Hi,
thanks for the respond! I will handle the trimeframe as you said.
To specify my second question:
I mean if my trading account is about 10,000.00 €. And i want to limit the strategy to, in case all goes wrong, stop render after using max 1,000.00€ from the account.
Is there a way to code that?
LeonParticipant
Junior
Hi,
i tried it but
“If strategyprofit<-1000 then notrade=1”
is not working.
Im getting Syntax Error.
Any ideas how to limit profitloss of a system to -1.000.00 €?
Regards
Leon
Hi Leon,
You can use
STRATEGYPROFIT and test if it returns a value below your allowed loss limit:
if STRATEGYPROFIT <-1000 then
notrade = 1
else
notrade = 0
endif
if notrade=0 and BUYcondition then
BUY 1 CONTRACT AT MARKET
endif
Why wouldn’t use the programmed Quit function instead?
if STRATEGYPROFIT <-1000 then
QUIT
endif
LeonParticipant
Junior
Thanks for your quick answer – will try both 😉
Regards
Leon