JSParticipant
Senior
Hi @flippingthefib
I think the different time frames in the indicator are causing the problems…
It is better not to call the indicator via “CALL” but to process it in your trading system…
Below as an example the trading system including the indicator…
Now you can also “back test” this system…
DefParam CumulateOrders = False
TimeFrame(1 hour)
If OpenTime=220000 then
xHigh2200=Highest[8](High)
xLow2200=Lowest[8](Low)
R=0
G=0
B=255
EndIf
TimeFrame(Default)
If Close < xLow2200 then
Buy 1 contract at Market
EndIf
If Close > xHigh2200 then
SellShort 1 contract at Market
EndIf
Set Stop pLoss 10
Set Target Profit 20
JSParticipant
Senior
Hi @flippingthefib
Here is the indicator with the “High and Low” starting at the three times…
Did it work with the trading system…?
TimeFrame(1 hour)
If OpenTime=060000 then
xHigh0600=Highest[8](High)
xLow0600=Lowest[8](Low)
R=255
G=0
B=0
EndIf
If OpenTime=140000 then
xHigh1400=Highest[8](High)
xLow1400=Lowest[8](Low)
R=0
G=255
B=0
EndIf
If OpenTime=220000 then
xHigh2200=Highest[8](High)
xLow2200=Lowest[8](Low)
R=0
G=0
B=255
EndIf
TimeFrame(Default)
Return xHigh2200 as "High2200" Coloured(0,0,B), xLow2200 as "Low2200" Coloured(0,0,B), xHigh1400 as"High1400" Coloured(0,G,0), xLow1400 as "Low1400"Coloured(0,G,0), xHigh0600 as "High0600" Coloured(R,0,0), xLow0600 as "Low0600" Coloured(R,0,0)
Yes it did but i had to change it a bit i needed it to buy or sell at the cross over not when it was lower cause it then took too many trades the only thing is it takes the trade at the close of the candle. can it be dont during the candle like as soon as it crosses im wondering
But thanks Js you have been a massive help and thank you for all the time you put into it