Автор |
Сообщение |
tlt-vlad
Зарегистрирован: 19.01.2008
Сообщения: 162
Откуда: ... теперь Москва
|
Плагин (dll) скопировал в папку Plugins, предварительно удалив аналогичную dll(старую).
Может быть проблема в том что у меня система 64 бит, Ами - 32, плагин - 32.
Второй вариант, в котором Ами всё забудет после закрытия - не вариант. Теряется весь смысл. |
_________________ Price Action Forever... |
|
Посмотреть профиль Отправить личное сообщение |
|
000
Site Admin
Зарегистрирован: 10.12.2007
Сообщения: 9106
|
У меня тоже 64 а ами и плпгин 32.
Попробуй удалить все плагины и оставить один мой. Если заработает, то добавляй по одному обратно. Иногда бывает, что конфликтуют между собой. |
_________________ ceterum censeo carthaginem esse delendam
Удачи. Олег. |
|
Посмотреть профиль Отправить личное сообщение Посетить сайт автора |
|
tlt-vlad
Зарегистрирован: 19.01.2008
Сообщения: 162
Откуда: ... теперь Москва
|
Пжл сбрось в личку свой плагин. |
_________________ Price Action Forever... |
|
Посмотреть профиль Отправить личное сообщение |
|
trashfx
Зарегистрирован: 27.06.2015
Сообщения: 90
|
|
Посмотреть профиль Отправить личное сообщение |
|
trashfx
Зарегистрирован: 27.06.2015
Сообщения: 90
|
tlt-vlad писал(а): |
Пжл сбрось в личку свой плагин. |
What do you need a plugin for to draw lines/areas? |
|
|
Посмотреть профиль Отправить личное сообщение |
|
000
Site Admin
Зарегистрирован: 10.12.2007
Сообщения: 9106
|
tlt-vlad писал(а): |
Пжл сбрось в личку свой плагин. |
У меня точно тот-же который на сайте. Когда ты сказал, что у тебя не работает я скачал с сайта и заменил свой. |
_________________ ceterum censeo carthaginem esse delendam
Удачи. Олег. |
|
Посмотреть профиль Отправить личное сообщение Посетить сайт автора |
|
tlt-vlad
Зарегистрирован: 19.01.2008
Сообщения: 162
Откуда: ... теперь Москва
|
Олег, добрый день!
в очередной раз скачал с сайта plugins http://www.amibroker.com/odbc.html
и скопировал с заменой в соотв папку в Ами. Все другие плагины с этой папки убрал. К сожалению результат тот же. В окне Tools -> Plugins вижу оставшиеся - ODBC.dll и ODBCA.dll. Когда кидаю твой код\индюк на график результат прежний.
Может быть дело в Ами, у меня версия 5.90.1. ??? |
_________________ Price Action Forever... |
|
Посмотреть профиль Отправить личное сообщение |
|
trashfx
Зарегистрирован: 27.06.2015
Сообщения: 90
|
BTW, in case you havn't noticed yet, I'm talking about persistency option of staticvarset/...settext.
Цитата: |
StaticVarSet
- sets the value of static variable
Miscellaneous functions
(AFL 2.60)
SYNTAX StaticVarSet( ''varname'', value, persistent = False, compressionMode = cmDefault )
.....
.....
Persistency
Starting from version 5.80 there is a new parameter persist. If it is set to True then static variable will be stored in PersistVars.bin file when AmiBroker is closing and reloaded automatically on next startup, preserving the values of static variables between application runs). In addition to saving them automatically on exit, persistent static variables can be auto-saved at user-specified intervals using SetOption("StaticVarAutoSave", interval );
....
|
So again, what do you need external plugins for? I don't get.
I don't even understand why one would need static variables at all just for drawing horizontal levels for each symbol since the same can be done via manual line studies being called from AFL in case you want to build alerts or whatever. |
|
|
Посмотреть профиль Отправить личное сообщение |
|
tlt-vlad
Зарегистрирован: 19.01.2008
Сообщения: 162
Откуда: ... теперь Москва
|
trashfx писал(а): |
tlt-vlad писал(а): |
Пжл сбрось в личку свой плагин. |
What do you need a plugin for to draw lines/areas? |
Hi guy,
I do not understand why reading russian text you write in english ???
If you are going to help, please, tell me, how can I keep on each chart own adjusted indicator i.e. having " belt" on one chart/ticker, when I switching to other ticker I see the same belt with old chart adjustments. It would be great to keep own adjustments for each ticker. Please, be aware I do no draw it manaually. You saw my code at the beging of the topic.
Look forward to hearing you recommendations. |
_________________ Price Action Forever... |
|
Посмотреть профиль Отправить личное сообщение |
|
trashfx
Зарегистрирован: 27.06.2015
Сообщения: 90
|
tlt-vlad писал(а): |
trashfx писал(а): |
tlt-vlad писал(а): |
Пжл сбрось в личку свой плагин. |
What do you need a plugin for to draw lines/areas? |
Hi guy,
I do not understand why reading russian text you write in english ??? |
Most probably since I'm not Russian I have to use Google translator. But some sentences being translated to English are not perfectly translated to make a rock solid meaning out of it. But as I understand you want to draw horizontal levels and those per symbol levels shall not appear on other symbols if switching symbols.
tlt-vlad писал(а): |
If you are going to help, please, tell me, how can I keep on each chart own adjusted indicator i.e. having " belt" on one chart/ticker, when I switching to other ticker I see the same belt with old chart adjustments. It would be great to keep own adjustments for each ticker. Please, be aware I do no draw it manaually. You saw my code at the beging of the topic.
Look forward to hearing you recommendations. |
By "belt" do you mean a horizontal support/resistance zone?
Well, I have already given suggestions to that incl. AmiBroker's knowledge base.
Manually drawn studies are per symbol studies. They do not appear on other symbols when switching symbols. Manually drawn studies are stored to each symbol's binary file in your DB. And those studies can be called from AFL code via Study() function. See example from previous page. So IMO that's the most simple way as they (single or multiple ones) can be easily set and re-set without opening param window.
And if you don't want to use manual studies but want to set those levels from AFL code via Param() then use persistent variables in order to preserve them per symbol. There is no plugin required for that. |
|
|
Посмотреть профиль Отправить личное сообщение |
|
000
Site Admin
Зарегистрирован: 10.12.2007
Сообщения: 9106
|
Хм. Оказывается статические переменные можно сохранять. Не знал этого. Упустил.
Тогда можно обойтись и без плагина. Вариант с использованием статических переменных я выше приводил. Или сам измени чтобы они сохранялись после закрытия программы или подожди до вечера. Я сам сделаю. Мне любопытно как это работает. |
_________________ ceterum censeo carthaginem esse delendam
Удачи. Олег. |
|
Посмотреть профиль Отправить личное сообщение Посетить сайт автора |
|
000
Site Admin
Зарегистрирован: 10.12.2007
Сообщения: 9106
|
trashfx писал(а): |
...
Persistency
...
|
Thank you for mentioning the new value persist in the function StaticVarSet.
I missed appearance of this option |
_________________ ceterum censeo carthaginem esse delendam
Удачи. Олег. |
|
Посмотреть профиль Отправить личное сообщение Посетить сайт автора |
|
tlt-vlad
Зарегистрирован: 19.01.2008
Сообщения: 162
Откуда: ... теперь Москва
|
trashfx писал(а): |
tlt-vlad писал(а): |
trashfx писал(а): |
tlt-vlad писал(а): |
Пжл сбрось в личку свой плагин. |
What do you need a plugin for to draw lines/areas? |
Hi guy,
I do not understand why reading russian text you write in english ??? |
Most probably since I'm not Russian I have to use Google translator. But some sentences being translated to English are not perfectly translated to make a rock solid meaning out of it. But as I understand you want to draw horizontal levels and those per symbol levels shall not appear on other symbols if switching symbols.
tlt-vlad писал(а): |
If you are going to help, please, tell me, how can I keep on each chart own adjusted indicator i.e. having " belt" on one chart/ticker, when I switching to other ticker I see the same belt with old chart adjustments. It would be great to keep own adjustments for each ticker. Please, be aware I do no draw it manaually. You saw my code at the beging of the topic.
Look forward to hearing you recommendations. |
By "belt" do you mean a horizontal support/resistance zone?
Well, I have already given suggestions to that incl. AmiBroker's knowledge base.
Manually drawn studies are per symbol studies. They do not appear on other symbols when switching symbols. Manually drawn studies are stored to each symbol's binary file in your DB. And those studies can be called from AFL code via Study() function. See example from previous page. So IMO that's the most simple way as they (single or multiple ones) can be easily set and re-set without opening param window.
And if you don't want to use manual studies but want to set those levels from AFL code via Param() then use persistent variables in order to preserve them per symbol. There is no plugin required for that. |
Thank you for your comments. You are right, I am interesting for resistance \ support zones. I will focus on your recommendations.
BR
Vladimir |
_________________ Price Action Forever... |
|
Посмотреть профиль Отправить личное сообщение |
|
000
Site Admin
Зарегистрирован: 10.12.2007
Сообщения: 9106
|
Код: |
LH = Param("Level_High ",0,0,20000,0.0001);
LL = Param("Level_Low ",0,0,20000,0.0001);
if(Nz(StaticVarGet("ph")) != LH)
{
StaticVarSet("ph", LH);
StaticVarSet(Name() + "Level_High", LH, TRUE);
}
if(Nz(StaticVarGet("pl")) != LL)
{
StaticVarSet("pl", LL);
StaticVarSet(Name() + "Level_Low", LL, TRUE);
}
Level_High = StaticVarGet(Name() + "Level_High");
Level_Low = StaticVarGet(Name() + "Level_Low");
Color_Space = ParamColor("Color_Space", colorBlue);
Plot(C, "", colorBlack, styleCandle);
//PlotOHLC( 0,Level_High, Level_Low,0 , "Level_Space", Color_Space, styleCloud|styleNoTitle|styleNoLabel,0,100000 , XShift = 10 );
Plot(Level_High , "", Color_Space);
Plot(Level_Low , "", Color_Space);
|
Работает. Ура!!! |
_________________ ceterum censeo carthaginem esse delendam
Удачи. Олег. |
|
Посмотреть профиль Отправить личное сообщение Посетить сайт автора |
|
trashfx
Зарегистрирован: 27.06.2015
Сообщения: 90
|
000 писал(а): |
Код: |
LH = Param("Level_High ",0,0,20000,0.0001);
LL = Param("Level_Low ",0,0,20000,0.0001);
if(Nz(StaticVarGet("ph")) != LH)
{
StaticVarSet("ph", LH);
StaticVarSet(Name() + "Level_High", LH, TRUE);
}
if(Nz(StaticVarGet("pl")) != LL)
{
StaticVarSet("pl", LL);
StaticVarSet(Name() + "Level_Low", LL, TRUE);
}
Level_High = StaticVarGet(Name() + "Level_High");
Level_Low = StaticVarGet(Name() + "Level_Low");
Color_Space = ParamColor("Color_Space", colorBlue);
Plot(C, "", colorBlack, styleCandle);
//PlotOHLC( 0,Level_High, Level_Low,0 , "Level_Space", Color_Space, styleCloud|styleNoTitle|styleNoLabel,0,100000 , XShift = 10 );
Plot(Level_High , "", Color_Space);
Plot(Level_Low , "", Color_Space);
|
Работает. Ура!!! |
Также проверьте
SetOption("StaticVarAutoSave", interval )
https://www.amibroker.com/guide/afl/setoption.html
Цитата: |
StaticVarAutoSave - allow periodical auto-saving of persistent static variables (in addition to saving on exit, which is always done).
The interval is given in seconds.
For example:
SetOption("StaticVarAutoSave", 60 ); // auto-save persistent variables every 60 seconds (1-minute)
It is important to understand that persistent variables are saved ON EXIT automatically, without any user intervention so it should be enough for most cases. If you for some reason want auto-saves when AmiBroker is running, then you can use this function. Please note that writing many static variables into physical disk file takes time and it blocks all static variable access so you should AVOID specifying too small auto-save intervals. Saving every second is bad idea - it will cause overload. Saving every 60 seconds should be fine. Calling function with interval set to zero disables auto-save. SetOption("StaticVarAutoSave", 0 ); |
|
|
|
Посмотреть профиль Отправить личное сообщение |
|
|