Signal on 1h, trade on 5 min
- This topic has 5 replies, 2 voices, and was last updated 5 years ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
Similar topics:
Forums › ProRealTime English forum › ProOrder support › Signal on 1h, trade on 5 min
I want to get a signal on the 1 hour timeframe using the timeframe(1 hour) then I would like to take the trade on the 5 min timeframe(5 minute). I notice I can get the signal many times from the hourly time frame so I would only like to take 1 trade / hour. Also I either get stopped out or take profit especially if stopped out would not like to try again this hour. How can I code this? any tips
In the 1h TF add:
|
1 |
MyBar = Barindex |
Then add this to your 5min TF:
|
1 2 3 4 5 6 7 |
Once TradeON = 1 If OnMarket Then TradeON = 0 endif If not OnMarket and MyBar <> MyBar[1] Then TradeON = 1 Endif |
I edited the above code.
Also add
|
1 |
And TradeON = 1 |
to your entry conditions.
Hey Roberto, I have a new challenge for you. I wanna try to trade 2 times per hour just to se how I fair with a few more trades. The reason could be I could use a tigheter stop to take the first wave down and the get out on the pullback and then back in. Ofc I could also use a larger stop but I still like to minimize any damage when Im going the wrong way. Do you know how?
You need to add a variable to count trades.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
DEFPARAM CumulateOrders = false TIMEFRAME(1 hour,UpdateOnClose) Sma10 = close > average[10,0](close) //variable updated every hour Bar1h = BarIndex //variable updated every hour TIMEFRAME(default) ONCE Count = 0 IF Bar1h <> Bar1h[1] THEN //at each hour change clear Count Count = 0 ENDIF IF Sma10 AND Count < 2 AND Not OnMarket THEN BUY 1 CONTRACT AT MARKET Count = Count + 1 //Tally trades opened ENDIF SET TARGET pPROFIT 15 SET STOP pLOSS 15 |
Find exclusive trading pro-tools on