Thread: How to code?
View Single Post
  #39 (permalink)  
Old 03-11-2006, 01:34 PM
divergence_trader divergence_trader is offline
Junior Member
 
Join Date: Feb 2006
Posts: 9
divergence_trader is on a distinguished road
i'm looking for code to make my EA trade at half volume if it trades the same direction in a pair twice in a row, i.e

if i enter GBPUSD at full volume long at 1.7500, and the next signal I see is also a GBPUSD long say at 1.7530, the second trade should be half volume, as it is rejoining a move which has already been going for a while, so the risk should be lowered.

so basically i need my EA to access the record of the last closed trade on the current pair and get it's open price and whether it was a short or long position.

could the above code be modified to do something like that? i've tried to do it myself but it's all a bit advanced for me

thanks
Reply With Quote