Chicago, Illinois
Experience: Intermediate
Platform: Tradingview, Tradestation
Broker: NinjaTrader
Trading: Futures, Options
Posts: 28 since Mar 2022
Thanks Given: 21
Thanks Received: 23
|
Hey Everyone I am trying to program rob smiths the strat (my interpretation of it at least) into easy language as a strategy so that I can automate it. I have had good success with manually trading it and want to automate but am running into a couple issues getting it automated. I will include what I have so far at the bottom.
Issue 1 it is closing on the same bar it opens the trade
Issue 2 is the stop does not seem to be being hit ever not sure if it is due to issue 1
for background on what I am trying to accomplish, I want to buy the current candle if it breaks the high of the previous candle and to place a stop at the low of the previous candle, it would then trail the stop to each previous candle low until stopped out. If I could get it to also have a user defined ema filter (such as only take long entries if above say a 50 ema) even better.
here is what I have so far.
[IntrabarOrderGeneration = True]
Condition1 = High > High of 1 bar ago;
if Condition1 then
Buy ( "Buy" ) at next bar market ;
if Condition1 Then Setstoploss at (Low of 1 bar ago) ;
Any help is greatly appreciated, as I don't see anything in documentation that suggests what I put in should be behaving like this.
|