Hi Everyone,
Just wondering if someone could kindly help in building up this strategy. I have been trying many ways but this is really hard.
It goes like this,
In the 15 min Chart – If the time 7pm and 1am take the open or the close price of the highest candle and the lowest candle of the range 7am-1am. then if the market stretches and goes up to 1.5 or 2 ATR of that range enter short, the Stop loss is at 3ATR of that range. The target will be at 50% in the range. the whole thing should not trigger if the time passes at 10am next day after london session.
I have added a picture, hopefully, it will make all clear.
Please if anyone can kindly help will be highly appreciated.
Thank you in advance.
JSParticipant
Senior
Hi,
Maybe a few useful ideas…
I understand from your story that you want to calculate the ATR based on the “Close”…
Determining the “reference ATR”:
If Time=070000 then
xClose0700=Close
EndIf
If Time=130000 then
xClose1300=Close
EndIf
ATRreference=xClose1300-xClose0700
After 01:00pm determine your current ATR…
If Time>130000 then
ATRcurrent=Close – Close1300
Determine if the current ATR is greater than the reference ATR:
If ATRcurrent>2*ATRreference then (1,5 of 2)
SellShort x contracts at Market
EndIf
Set Stop pLoss 3*ATRreference
Set Target pProfit ATRreference/2 (50% of the original ATR)
JSParticipant
Senior
You can also calculate the reference ATR with:
If Time=130000 then
HH=Highest[24]High
LL=Lowest[24]Low
ATRreference=HH-LL
EndIf
From 07:00am to 01:00pm is six hours divided by 15 minutes (time frame) = 24
@JS Thanks very much for your kind responde.
it should calculate
7pm to 1am candles and take the highest high and the lowest low of the close or the open price? not sure if its possible to do it!
Maybe I didn’t explain it well, so the entry at fib level 150 or 200% as seen in the new pic. Stop at 300% and TP will be in the 50% in that initial range of 7pm to 1am highest close or the open price and the lowest close or the open price which ever has happen! if the trade did not trigger by 10 am should cancel the whole thing.
Please kindly see the new pic if you can get an idea.
I really appreciate any help you can provide.
JSParticipant
Senior
Hi
Try this basic system first…
(currently without “cancel” at 10am…)
DefParam CumulateOrders=False
If OpenTime=010000 then
HH=Highest[24](High)
LL=Lowest[24](Low)
ATRreference=HH-LL
FibLevel0=Close
EndIf
//If OpenTime>=010000 then
//CancelTime=0
//EndIf
//
//If OpenTime>=100000 and NOT OnMarket then
//CancelTime=1
//EndIf
If (Close-FibLevel0)>1.5*ATRreference then//and CancelTime=0 then //1.5=150%
SellShort 1 contract at Market
EndIf
If (FibLevel0-Close)>1.5*ATRreference then//and CancelTime=0 then
Buy 1 contract at Market
EndIf
Set Stop pLoss (ATRreference*3)
Set Target pProfit (ATRreference/2)
Hi JS,
Thanks For your time in this.
This right actual two orders should be there one for long and one for short. once the 7pm an 1am range happened.
when I try your code there’s soo many other orders that have happened too, Is it because it doesn’t know the time to stop? I meant the whole thing should be cancelled if the trade did not trigger by 10am.
I have attached a pic hopefully this time everything will be much clearer.