Im having a problem and I wonder if some of you smart guys have an idea to fix it?
I have made a simple program that goes long if the price returns back to a price when a green bar open on the same price as the previous red bar was closing and then follows by a new green bar.
Is there any way to save those values of StopLoss, BuyLevel and TakeProfit even if a new setup is coming before the price goes back to those levels? By now those values is changing as soon a new setup appears.
Ive been trying with count a couple of patterns to save around 3 different levels. But it is always the last one who appeared that the program is buying with.
It would be great to have the 5 latest patterns values saved until the price coming back there.
Do someone have an idea how to make it work? Should I use time limit or the date fuction maybe?
Hopefully you understand what im meaning even if its hard to explain with my bad English. 😊
Heres the code and a picture that maybe makes it a little bit easier to understand.
GreenBar=Close>Open//Its a green bar.
RedBar=Open>Close//Its a red bar.
SameLevelGreen=Open=Close//Current bar is on the same level as the one before.
Warning: Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced clients who have sufficient financial means to bear such risk. The articles, codes and content on this website only contain general information. They are not personal or investment advice nor a solicitation to buy or sell any financial instrument. Each investor must make their own judgement about the appropriateness of trading a financial instrument to their own financial, fiscal and legal situation.