我对thinkscript和编程一般来说都是新手。所以这对我来说是一个缓慢而痛苦的过程!
现在,我正试图从我的剧本所在的酒吧里拿到开盘价。
最基本的是
def trigger = masterconA and masterconA4h and e and f and (a or b or c or d);
def Counter = if BarNumber() == 1 then 0 else if trigger then Counter[1] + 1 else Counter [1] ;
def stopline = Lowest(low, length = 3) - ATR() * atrmulti;
独立验证与Entry相关的所有变量都在工作。
已验证的停止线工作正常
已验证的计数器工作正常。
已验证Addorder仅在counter=1 AND Trigger为true时激发。
当触发器为true且计数器为1时,要求入口点为=打开条
当触发器为true且计数器为1时,期望出口点为=到条的停止线
这些是有问题的变量
def entrypoint = if trigger and Counter == 1 then open else entrypoint == entrypoint [1];
def exitpoint = if trigger and Counter == 1 then stopline else exitpoint == exitpoint[1];
不幸的是,这两个变量似乎都没有任何价值。
试图绘制图表,或将结果放入Addlabel()或addchartbulle()中,都会破坏研究/策略
这里有一个逻辑故障,我只是不知道它在哪里。
下面的代码。
谢谢
`