
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
i dont care about stoch close so just current K% is enough.
code for check objects:
this deletes the id line after 96 candles. as i need
what i have to do now is to stop ea from drawing new tomato lines if one tomato line is already on chart.
i'm thinking adding
......... = stop and from the beginning (but still read the olive conditions)
code now:
to rephrase:
i want on the chart to have maximum one tomato line.
if that line will be used for OrderSend, delete the line.
if it expires (96), delete the line.
same for olive.
so if tomato line already on chart, no more tomato lines until no tomato on chart
hoped rephrasing will help find the solution :)
to rephrase:
i want on the chart to have maximum one tomato line.
if that line will be used for OrderSend, delete the line.
if it expires (96), delete the line.
same for olive.
so if tomato line already on chart, no more tomato lines until no tomato on chart
hoped rephrasing will help find the solution :)
is that the time you create your line ??? how to do that ??
So how can you avoid drawing other lines....??
i was thinking in changing back the name of the object as initial to stop the script from drawing lines due to the same name limitation... but i no function for changing name.
hmm.... i dont get it.
my mind is stuck ! i feel stupid and frustrated
i was thinking in changing back the name of the object as initial to stop the script from drawing lines due to the same name limitation... but i no function for changing name.
hmm.... i dont get it.
my mind is stuck ! i feel stupid and frustrated
when do you create a new line ??
not at the time of the bar you find highest or lowest
and you have to create only if there is no line
so if you create a new line use time of Time[0]
if you find your object then what name has it ?? ==> string id=ObjectName (i);
so what do you need to do ?? get this name when its have StringSubstr(id,0,7)=="tomato "
Come back to your first post :
"when i run this i get the first setup for tomato and for olive ok, then even if in journal i get "tomato ON" different price lvl, i don't get new tomato line on the chart. same for olive."
You don't get a new line because the old one already exist. Delete it and a new one will be drawed.
for the moment i did it like this :
and it looks that works like it should, just one line, and after 96 bars delete, the redraw when condition reappear.
does this work ?
could strings be < or > to one another, that is a question, i don't know.
You are making it complicated, because giol tell you that if you want several line, you have to give the lines different name. And he was right at that time.
If he knew you want only one line, he won't have say that. The solution devries has given is very good in case one has several lines, thank's devries
But If you want only one line call it "tomato" or "olive", then does ObjectFind("tomato") ObjectDelete ("tomato"), solve the problems of time apart with Time[96] and Time[0] stored when the line is drawed.
The next problèm that will happen is that the condition stoch> 75 could last 20 Bars or 50 Bars, then, when you will delete your line, the condition to draw the line will still be valid and as soon as the line will have been deleted, or an order taken, a new line will be drawed. good luck, it's not so difficult.
hi
as the object thing seemed to complicated for my two weeks of reading code i decided to set Level price for sell and buy. in this process i encounter a problem:
the "if (Close[2]>LSell && Close[1]>LSell && LevelSset==true) doesnt work.
if i remove the if (Close[2]>LSell && Close[1]>LSell) and leave (LevelSset==true), or if i change (Close[2]<LSell && Close[1]<1) the function seems to works properly.
thank you
some ideas, what is wrong... anyone ?
thank you