Forum

Totaling acrros charts

Hi, I use the first snippet of code to get the "floor" (profit lock) for each of the 4 strategies on my EA for each chart. I use the second snippet to add all 4 "Floors" for each chart. I am looking for help on how to add all the "Floors" on all the charts into 1 total. Hope that made sense. Thanks

trendline and arrow in the background

I was looking for help to tweak my code that closes orders, to ensure the arrow and trendline that is drawn from the order open to the order close at the time of close is all in the background. Here is what I use to close the order. Right now it creates a trend line and arrow that is NOT in the

If true then +1 - resets to 0 tomorrow

Hi there I am trying to track an even that when true the count will increment 1 and provide totals for the day, then reset when the ( server time ) day ends. I thought was pretty simple by placing the below code after the event proves true, but the counts are too high to be correct so the code is

Total count of open charts

Would someone help me with some code to return total open chart count

Clear Objects on Chart from "x" bars back

//----delete objects // { // for(int z=ObjectsTotal()-1; z>20; z--) { // ObjectDelete(ObjectName(z)); // } // Comment(""); // return(0); // } //----delete objects Hi everyone, I have been searching with no luck for a way to clear a chart from "x" bars back. So for example any objects that

A trailing take profit for my magic and pair (the group)

{ if (DB_Profit>=DB_Target);DBFloor=DB_Target;DB_Target=DB_Target*DB_Target_Factor; if (DB_Profit>=DB_Target); else if (DB_Profit<DBFloor); } j= OrdersTotal ()- 1 ; for (i=j;i>= 0 ;i--) { OrderSelect (i,SELECT_BY_POS,MODE_TRADES); RefreshRates(); if

Daily profit this symbol and this magic

Hi everyone, I am using this function to return today's profit for a specific pair and specific magic number for today only. but it seems to be totaling all magic numbers Does anyone see where I might be going wrong? double CCIDailyProfit() { double CCIprofit = 0 ; int cnt4 =

Help with closing orders with same magic on a chart when profit is reached

Hello everyone. I am struggling to understand where I am going wrong with this code. My goal is to every tick to have the EA totaling profit for all orders on a chart/symbol with the same magic number and when the profit target is reached, the EA should close all the orders under that same magic on

Help with my first EA - it's kind of jacked...

Hi everyone. I have working (searching the forum) the last few weeks and managed to pull together an EA that does not compile errors any more but the structure of it is all wrong and because is not executing at the proper times. I was hoping some kind soul could take a look and help me to

Check if existing stop exist in open order

Hi there, when I search I see a lot on how to check if a stop event took place but cannot figure how to check if a stop loss is currently place on my current open order. Something like: check all existing order on this symbol with this magic to see if there is a stop already placed, if not then