ID candle and SL (Solved)
-
Good morning!
I need help!
I need to know how I could do this:
1st Obtain the ID of the candle of the last SWING to be able to put it in the Stop Loss, after 3, 4, or 5 candles later (it is not known which candle is the SL until after several consultations).
2nd Place the SL with the previous candle obtained + or - 2 pips, depending on whether it is BUY or SELL -
You've got a lot to figure out if you're trying to code in the future not knowing exactly when something needs to happen.
If you truly wanted to try to search the candles in the future with FXDreema, you would make the candle ID a Negative #....but I dont believe that will work since that number will never come to be the current one since it is always negative.
-
Good morning
jsauter86!Thanks for the answer but I think I have explained myself wrong, I do not need to know the candle of the future but quite the opposite. What I need is: From the last Swing generated to know its ID and in the current candle open the operation with a Stop Loss with + 0 - pips according to the case of that SWING. In the attached drawing if the operation opens at point 2 the ID would be 4 but at point 1 it would be 2. Is this to know if it is ID 2 or 4. Is there any way to do it?
Thank you very much and sorry for my English -
no need to apologize! What are you using to determine the swing? Please explain the price action that you want to search for to define what is a swing to you, and that will help with a starting point.
I.e; "If this candle and this candle do this, then apply this here"
-
@xyon126 jsauter is right. Determining what you consider a swing is determining. What criteria do you use to consider price swinged?
-
Thanks to both!
The Swing for me in the case of the attached drawing is the minimum point or where the wick of the candle ends.
The idea is an EA Ichimoku where the entry candle is the candle that crosses the Tenkan, but before 6 candles after the Swing is generated below the Tenkan. So I need to know where the Swing is at that moment to apply it to the SL. -
Can you explain in detail what makes that a swing? To me you are just pointing at one candle over another....and I can make that into an EA, but thats just a starting point usually.
Are you meaning to say reversal instead of swing?
and the ID for the candle you are pointing at is 5, the lowest bull candle.
-
Hi!
For me, a swing is the last candle that is generated and that from this there is a pullback or impulse, that is, if there were two lines in the shape of a "V" this "V" would be a Swing and the candle that would be in Its lower vertex would be the candle I need, but naturally the more candles are generated after this the ID varies and increases, how can I do to identify it in some way and put that identification later in the SL?
-
Sorry, I don't understand how to continue from here. I'll leave it to the pros.
-
@jsauter86 said in ID candle and SL:
Sorry, I don't understand how to continue from here. I'll leave it to the pros.
Thank you very much anyway.
-
@xyon126 The problem is that that definition is very clear for a human trader. However, programming an EA to ideitify that 'V shape' can required hindreds of blocks because there can be dozens of possible combinations of candles to creare that shape. The EA need to know them all in order to ignore tha wrong ones and select only those you want.
This is why I always recommend a custom indicator doing that job. You will save a lot of pain and suffering, seriously.