I use this strategy.
Tis system aso opens every day, but also closes at midnight.
I want this system not to close at midnight, but only close when the limit is reached.
No mather how long this takes to close.
// Definitie van code parameters
DEFPARAM CumulateOrders = False // Opstapelen posities gedeactiveerd
// Het systeem zal alle lopende orders annuleren en alle posities sluiten om 0:00. Er zijn geen nieuwe toegestaan totdat na de “FLATBEFORE” tijd.
DEFPARAM CumulateOrders=false
DefParam FlatBefore = 090000
//DefParam FlatAfter = 230000
MyConditions = (open <= WeightedAverage[14](medianPrice))
Once TradeON = 1
If IntraDayBarIndex = 0 then
TradeON = 2
Endif
If OnMarket or StrategyProfit <> StrategyProfit[1] Then
TradeON = 0
endif
If MyConditions and TradeON and Not OnMarket Then
Sellshort 100 CONTRACT AT MARKET
Endif
// Voorkomt dat het systeem handelt op specifieke dagen van de week
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
// Stops and targets
//SET STOP ptrailing 15
SET TARGET pPROFIT 1.5
Post your topic in the correct forum:
_ ProRealTime Platform Support: only platform related issues.
_ ProOrder: only strategy topics.
_ ProBuilder: only indicator topics.
_ ProScreener: only screener topics
_ General Discussion: any other topics.
_ Welcome New Members: for new forum members to introduce themselves.
I moved it from ProBuilder.
Thank you 🙂
Remove or comment out line 6.