Topics
Replies
hamijonz
17 Jun 2022, 20:40
( Updated at: 21 Dec 2023, 09:22 )
RE:
amusleh said:
Hi,
Can you post your cBot/Indicator code? so we how you tried to access the value.
Fractal is a lagging indicator, you can't access it's value unless you wait x number of bars based on your provided period value for the indicator.
Thanks for the replay
Honestly, I do not have a robot or indicator at the moment to give you the code
But let me try to understand what I mean in another way
Forget the fractal. Please tell me how to find these points(The lowest and highest points)
With what code can I call them?
@hamijonz
hamijonz
05 Jun 2022, 20:55
( Updated at: 05 Jun 2022, 21:03 )
RE: thank you so much
amusleh said:
private void MoveStopLossToProfit(Position position, double profitInPips) { var positionSymbol = Symbols.GetSymbol(position.SymbolName); var profitInPipsSize = positionSymbol.PipSize * profitInPips; var newStopLossPrice = position.TradeType == TradeType.Buy ? position.EntryPrice + profitInPipsSize : position.EntryPrice - profitInPipsSize; ModifyPosition(position, newStopLossPrice, position.TakeProfit); }
@hamijonz
hamijonz
20 Jun 2022, 23:13
amusleh said:
Hi, thank you, but I didn't mean that. I want to get it more precisely
And I don't want to get the maximum of ten previous candlesticks, for example, I just want to get the highest previous and the highest two previous ones
For example, I want to say that if the last value of RSI exceeds the previous highest point, open a buy position.
I hope you understand what I mean
@hamijonz