Program Title - N&P Pseudo Code START BLOCK - List of Currency Pairs EURUSD GBPUSD USDJPY USDCHF AUDUSD END BLOCK - List Of Currency Pairs START BLOCK - Configuration Parameters *** Use 5 minute timeframe for all moving averages Set the Time frame at 5 minutes // *** Put it here in this block to define the time frame for the entire EA. // if you need to change the time frame you change it here only once Set TakeProfit Pips to 20 // ***You can make this either fixed or user adjustable -- as you wish. Set the value of TopFilterLevel manually on a daily basis for EURUSD Set the value of BottomFilterLevel manually on a daily basis EURUSD Set the value of TopFilterLevel manually on a daily basis for GBPUSD Set the value of BottomFilterLevel manually on a daily basis GBPUSD Set the value of TopFilterLevel manually on a daily basis for USDJPY Set the value of BottomFilterLevel manually on a daily basis USDJPY Set the value of TopFilterLevel manually on a daily basis for USDCHF Set the value of BottomFilterLevel manually on a daily basis USDCHF Set the value of TopFilterLevel manually on a daily basis for AUDUSD Set the value of BottomFilterLevel manually on a daily basis AUDUSD EURUSD Set BuyFlag (either true/false) EURUSD Set SellFlag (true/false) GBPUSD Set BuyFlag (t/f) GBPUSD Set SellFlag (t/f) USDJPY Set BuyFlag (t/f) USDJPY Set SellFlag (t/f) USDCHF Set BuyFlag (t/f) USDCHF Set SellFlag (t/f) AUDUSD Set BuyFlag (t/f) AUDUSD Set SellFlag (t/f) Set Lot size manually for All positions at once (same lot size) **what do you think Tim, this way I can just set either true or false for the condition at the beginning of the day and then the code would check for this when executing the trade. I thought about it and we can’t combine these flags with Top/BotFilter Levels, because there will be situations (often) when BuyFlag would be True but there will be no Top/Bot Level Filter set. Also typically I will adjust the Top/Bot Filter levels daily. Unless we can use the ‘flag’ system somehow to deactivate a filter (although I can always set an extreme level for it instead of just not using it, i.e. a level that I know won’t be reached by the currency). Answer ** Thats correct Nico - Just use set seperate flags for each currency pair as you have done. I see you have correctly added the flags to the buy sell logic in the main block. Well Done! I get the impression that you are starting to understand this stuff. END BLOCK - Configuration Parameters -------------------------------START BLOCK - Entry Rules----------------- If the 7 Period Exponential Moving Average is greater than the 14 Period Exponential Moving Average AND the 14 Period Exponential Moving Average is greater than the 50 period Simple Moving Average AND Current Price is less than TopFilterLevel THEN Signal a BUY (Long) entry condition If the 7 Period Exponential Moving Average is less than 14 Period Exponential Moving Average AND the 14 Period Exponential Moving Average is less than the 50 period Simple Moving Average AND Current Price is less than BottomFilterLevel THEN Signal a SELL (Short) entry condition //** As previoulsy discussed Use the time frame (5 minutes) defined in the configuration block for all moving averages --------------------------------END BLOCK - Entry Rules-------------------- --------------------------START BLOCK - Exit Rules------------------------ Any open order will be closed automatically by a Take Profit Order The take profit price is set by the open order If any Open Position is greater than or equal to 20 pips from the entry level THEN Close the Position (we will put this into the OrderSend ***** Yes that is correct Nico. I have added it to the order send logic. END BLOCK - Exit Rules START BLOCK - Main - This block controls the whole flow of the program With each Currency Pair in the List of Currency Pairs block do all of the following Check the Flags to see which currencies we are allowed to Buy or SELL Check the Entry Rules block to see if a BUY or SELL condition exists for the allowed Currency Pairs Check to see if there is already an open BUY position for this Currency Pair Check to see if there is already an open SELL position for this Currency Pair If there is no open BUY position for this currency pair AND a Buy condition exixts for this currency pair AND the BuyFlag is set true for this currency pair THEN Open a BUY Position for this currency pair USING Last Ask Price AND Pre-determined Lot size AND Pre-Determined Profit Stop Amount If there is no open SELL position for this currency pair AND a SELL condition exixts for this currency pair AND a SellFlag is true for this currency pair THEN Open a SELL Position for this currency pair USING Last Bid Price AND Pre-determined Lot size AND Pre-Determined Take Profit Stop Amount END BLOCK - Main *** Tim’s Q: What information do you need to place an order? Symbol: We will specify this dependent on the pair **** Correct Cmd: operation, eg: ‘buy’ - **** Correct Volume: this will call ‘Lots’ *** Correct Price: Ask/Sell -Correct Slippage: I don’t think we need any because even if the price jumps it is still likely to be under same conditions and if it’s not then we don’t want to enter anyway. What do you think? ** OK . This may be inluenced by your brokers policy and server settings. Some brokers, mine included, have done various things to put a stop to agressive piping.. StopLoss: None.** Correct Take Profit: 20pips *** Correct . I added this to the configuration parameters block String Comment: I don’t really get what this is for. - ***Answer*** It is used if you want to put a comment in the order history. For example I run multile EA's and use it to idenify which EA placed the order. Handy for my weekly analysis. Not necessary unles you have a specific need. Magic Number: I think this is to label trades, I get a feel we could use this but don’t know how. *** Answer ** Correct it is the traders own reference number on the order. Again not necessary unless you have a specific need. I use it to seperate orders placed by different EA's on the same account so that one EA doesn't interfer with another EA's order. Datetime: none **** OK Colour: buy = green arrow, sell = red arrow. ** OK