| / | Forum |
|
tkelvisa
2008.02.04 23:01
can someone give me example of code that create some window where i can put some values and later a can use that imput in my expert advisor.
thanks |
|
"Raymond Toh have said in one of his articles: “There’s no way to make profit trading Forex without firmly established rules and the discipline to obey them”. You can not obey your rules if you trade manually, believe me I tried manual trading and lost a lot of money. For the peace of your mind you have to find a programmer and describe your manual practice to him and he will give you back an Expert Advisor that makes your manual trading 100% automated!" |
|
phy
2008.02.04 23:04
Have the EA read a label in the chart window, and change the label to give data to the EA |
|
tkelvisa
2008.02.04 23:09
phy wrote:
i'm not sure that you understand me.Have the EA read a label in the chart window, and change the label to give data to the EA i would like when i start my EA that pop up window apear and to ask me to write e.g. "buy limit price" so i don't need to go into e.a. |
|
phy
2008.02.04 23:15
tkelvisa wrote:
phy wrote: i'm not sure that you understand me.Have the EA read a label in the chart window, and change the label to give data to the EA i would like when i start my EA that pop up window apear and to ask me to write e.g. "buy limit price" so i don't need to go into e.a.
Have the EA create a label in the window that says "Input Buy Limit Price Here" and select it, and change the text to your limit price. Try it, or not. You have asked this same question more than once with little response. |
|
tkelvisa
2008.02.04 23:24
phy wrote:
Have the EA create a label in the window that says "Input Buy Limit Price Here" and select it.tkelvisa wrote:
phy wrote: i'm not sure that you understand me.Have the EA read a label in the chart window, and change the label to give data to the EA i would like when i start my EA that pop up window apear and to ask me to write e.g. "buy limit price" so i don't need to go into e.a.
Have the EA create a label in the window that says "Input Buy Limit Price Here" and select it, and change the text to your limit price. Try it, or not. You have asked this same question more than once with little response. yes but i need help how to do it!!! thanks |
|
phy
2008.02.04 23:59
ObjectCreate() object type OBJ_LABEL ObjectSetText() to set the label text ObjectDescription() to read the value you store in the label StrToDouble() to convert the text string in the label to a price value |
|
edddim
2008.02.05 10:34
Does this could help?
int start() { bool draw=1; double orderPrice; int orderTicket[1],li,order,lenth; string text,type[4], desc="BuySellLimitStop Price", txt=StringConcatenate(Symbol(),Period(),"BSLSO"); type[0]="BuyLimit"; type[1]="SellLimit"; type[2]="BuyStop"; type[3]="SellStop"; // ... conditions ... if ( draw == true ) // if conditions needed { if(ObjectFind(txt)<0)Text(txt,desc); } // search for order send if(ObjectFind(txt)>-1) { if(ObjectDescription(txt)!=desc) { text=ObjectDescription(txt); for(li=0;li<4;li++) { if(StringFind(text,type[li],0)>-1) { order=li+2; break; } } orderPrice=StrToDouble(StringSubstr(text,StringLen(type[2]+1))); // ... #include trade ... orderTicket[0]=OrderSend(Symbol(),order,orderPrice,10,0.0,0.0,"",0,0,Green); Comment("OrderType ",type[li]," is integer = ",order,", at Price ",orderPrice); if(orderTicket[0]>0) { if(ObjectFind(txt)>-1) { ObjectDelete(txt); orderTicket[0]=0; } } } } return(0); } //+------------------------------------------------------------------+ void Text(string _LN, string _LT) { if(ObjectFind(_LN)<0) ObjectCreate(_LN, OBJ_LABEL, 0, 0, 0); ObjectSet( _LN, OBJPROP_CORNER, 1); ObjectSet(_LN, OBJPROP_XDISTANCE, 10.0); ObjectSet( _LN, OBJPROP_YDISTANCE, 10.0); ObjectSetText (_LN, _LT, 12, "Arial Bold", LightSeaGreen); return;}As input should be clear writte "BuyLimit" or other with followed space (as written) and price. |