Last active
August 13, 2019 14:57
-
-
Save fillman/1a30de509001d9bbb6a6e768ac922c45 to your computer and use it in GitHub Desktop.
Base TOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Проп-трейдинговая компания Dolphin Traders | |
#https://dolphin-traders.com | |
#Pyrogov Timofii | |
#ищет базы из N последних свечей, на любых уровнях. | |
def iDiff = 0; #максимальное отклонение в центах | |
def iBars = 5; #число баров для просмотра | |
def iLowest = lowest(low,iBars); | |
def iHighest = highest(high,iBars); | |
def bBaseLow = AbsValue(Average(low, iBars) - iLowest) <= iDiff; | |
def bBaseHigh = AbsValue(Average(high, iBars) - iHighest) <= iDiff; | |
plot bBase = if bBaseLow then 1 else if bBaseHigh then 2 else 100; | |
AssignBackgroundColor (if (bBase == 1) then Color.LIGHT_GREEN else if (bBase == 2) then Color.LIGHT_RED else Color.black); | |
bBase.AssignValueColor (if bBase <> 100 then Color.black else Color.CURRENT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment