I want custom bool function code to compare Bid Price

Dec 18, 2023
2
0
1
46
Hi,
i want custom function code that compare starting Bid price and Bid price i cant explain in word but attached figure better explain.
example if starting bid price is 146.565 is stored in a variable after that when bid price move up or down the diffrence between bid and starting bid price should be calculate please see attachment.
once bid price reached strait away predefine target example 20 pip or higher from starting point without getting revers single pip the function may return true and if bid price reverse single pip the function return false and current bid price should be the starting point and recalculation strt here.
 

Attached File(s)

  • bool function.jpg
    bool function.jpg
    128.7 KB · Views: 1