how to write an algo for the following:
- buy when latest 5 minute candle breaks days high by 0.15%.
- sell when latest 5 minute candle breaks days low by 0.15%
how to write an algo for the following:
how to decide a day low or high? did you mean yesterday low price ,a running day low price will always changes .
Sir i want to buy after the close of first 5 minute candle.
Lets say i am considering intraday 5 min chart. I want to buy when rsi is above 50 and latest 5 min candle has crossed today’s high by 0.15%.
so,algo is comparing only days first 5m candle.as per your screenshot ,you will have 2 positions ,since rsi satisfies > 50 ,when to close a position ?
based on rsi ,or order percentage ?
Sir i want to buy after the following conditions are met:
im writing in tradingview pine ,for pi tradescript , there is no api avialable to get chart 5m days first candle ,its not possible in pi .
reagarding condition 4 ,is lasterst new candle ,whole should be above to previous candle ,only close price ?
Regarding condition 4 , the high of latest candle should be higher than that days high.
Say from 9:15 am to 10 am high is 100.00 and 10:05 am candle crosses above 100.15 (0.15%) above) than i will buy. In short I will buy when the latest 5 min candle breaks today’s high by 0.15%.
Also sir when i am backtesting there are many trades happening for a strategy.
I want to set condition in algo where only one trade should take place in one day after that it should stop for that particular stock.
I made the same script yesterday for the trading view…only condition does not add that 0.15% high break …