|
trading functions
Hey I was wondering if there any quick drop-in functions that i can include in my ea's for trading functions, ill add a few for you guys that i created, i was hoping to have something similar for the following:
open buy trade
close buy trade (specific trade)
open sell trade
close sell trade (specific trade)
close all buys
close all sells
add trailing stop to buy
add trailing stop to sell
count open buys
count open sells
any other functions that control trading..
the simpler to initialize these functions the better imo
here is my donation to this project
this is for creating labels and lines on the chart
void LineMaker(string name,color LineColor,double price, string Description){
ObjectCreate(name, OBJ_HLINE, 0,TimeCurrent(),price);
ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(name, OBJPROP_COLOR, LineColor);
ObjectSet(name, OBJPROP_BACK, true);
ObjectSetText(name,Description,8,"Arial",LineColor );
return(0);
}
void LabelMaker(string lblname,int x,int y,string window,string txt,int size,string font,color txtcolor){
ObjectCreate(lblname, OBJ_LABEL, WindowFind(window), 0, 0);
ObjectSet(lblname, OBJPROP_CORNER, 0);
ObjectSet(lblname, OBJPROP_XDISTANCE, x);
ObjectSet(lblname, OBJPROP_YDISTANCE, y);
ObjectSetText(lblname,txt,size,font, txtcolor);
return(0);
}
as you can see i try to make it so its just a 1 line piece of code so that its easier to manage
my idea is to make programming easier and less code with just including the functions into the ea which would allow for easier manipulation.
thanks in advance
|